Skip to content

Commit

Permalink
Add zero-width space character to escape the @ symbol in doc commen…
Browse files Browse the repository at this point in the history
…ts (#21)

* zwsp

* keep v

* bump version

* fix

* platforms: [web]

* platforms
  • Loading branch information
danylo-safonov-solid committed Sep 22, 2023
1 parent 11854cf commit e758aa1
Show file tree
Hide file tree
Showing 34 changed files with 223 additions and 221 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.4
- Fixed links in docs.
- Updated supported platforms.

## 0.0.3
- Unlock SDK >= 3.1.0.

Expand Down
2 changes: 1 addition & 1 deletion lib/deno_postgres_interop.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// An interop for [deno-postgres@v0.17.0](https://deno.land/x/postgres@v0.17.0).
/// An interop for [deno-postgres@v​0.17.0](https://deno.land/x/postgres@v0.17.0).
library;

export 'src/client.dart';
Expand Down
8 changes: 4 additions & 4 deletions lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import 'dart:js_util';
import 'package:deno_postgres_interop/src/client_options.dart';
import 'package:deno_postgres_interop/src/query_client.dart';

/// [deno-postgres@v0.17.0/Client](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client).
/// [deno-postgres@v​0.17.0/Client](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client).
@JS()
class Client extends QueryClient {
/// [deno-postgres@v0.17.0/Client/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client#ctor_0).
/// [deno-postgres@v​0.17.0/Client/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client#ctor_0).
external factory Client(String dbUrl);

/// [deno-postgres@v0.17.0/Client/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client#ctor_0).
/// [deno-postgres@v​0.17.0/Client/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client#ctor_0).
factory Client.config(ClientOptions config) =>
callConstructor('Client', [config]);

/// [deno-postgres@v0.17.0/Client/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client#ctor_0).
/// [deno-postgres@v​0.17.0/Client/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Client#ctor_0).
factory Client.empty() => callConstructor('Client', null);
}
20 changes: 10 additions & 10 deletions lib/src/client_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import 'package:deno_postgres_interop/src/query_object_options.dart';
import 'package:deno_postgres_interop/src/query_object_result.dart';
import 'package:deno_postgres_interop/src/util.dart';

/// [deno-postgres@v0.17.0/QueryArguments](https://deno.land/x/postgres@v0.17.0/query/query.ts?s=QueryArguments).
/// [deno-postgres@v​0.17.0/QueryArguments](https://deno.land/x/postgres@v0.17.0/query/query.ts?s=QueryArguments).
typedef QueryArguments = Object;

/// This class hosts common interops for clients.
class ClientCommon {
/// [deno-postgres@v0.17.0/Transaction/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryArray_0).
/// [deno-postgres@v0.17.0/QueryClient/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryArray_0).
/// [deno-postgres@v​0.17.0/Transaction/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryArray_0).
/// [deno-postgres@v​0.17.0/QueryClient/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryArray_0).
static Future<QueryArrayResult<T>> queryArray<T extends List<dynamic>>(
Object queryable,
String query, [
QueryArguments? arguments,
]) =>
_query('queryArray', queryable, query, arguments);

/// [deno-postgres@v0.17.0/Transaction/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryArray_1).
/// [deno-postgres@v0.17.0/QueryClient/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryArray_1).
/// [deno-postgres@v​0.17.0/Transaction/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryArray_1).
/// [deno-postgres@v​0.17.0/QueryClient/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryArray_1).
static Future<QueryArrayResult<T>>
queryArrayWithOptions<T extends List<dynamic>>(
Object queryable,
Expand All @@ -38,17 +38,17 @@ class ClientCommon {
// ): Promise<QueryArrayResult<T>>
// https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryArray_2

/// [deno-postgres@v0.17.0/Transaction/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryObject_0).
/// [deno-postgres@v0.17.0/QueryClient/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryObject_0).
/// [deno-postgres@v​0.17.0/Transaction/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryObject_0).
/// [deno-postgres@v​0.17.0/QueryClient/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryObject_0).
static Future<QueryObjectResult<T>> queryObject<T>(
Object queryable,
String query, [
QueryArguments? arguments,
]) =>
_query('queryObject', queryable, query, arguments);

/// [deno-postgres@v0.17.0/Transaction/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryObject_1).
/// [deno-postgres@v0.17.0/QueryClient/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryObject_1).
/// [deno-postgres@v​0.17.0/Transaction/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryObject_1).
/// [deno-postgres@v​0.17.0/QueryClient/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryObject_1).
static Future<QueryObjectResult<T>> queryObjectWithOptions<T>(
Object queryable,
QueryObjectOptions config,
Expand All @@ -61,7 +61,7 @@ class ClientCommon {
//
// [related issue](https://github.com/dart-lang/language/issues/1988).
//
// [deno-postgres@v0.17.0/QueryClient/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryObject_2).
// [deno-postgres@v​0.17.0/QueryClient/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_queryObject_2).
// Future<QueryObjectResult<T>> queryObjectWithOptions<T>(
// List<String> query,
// List args,
Expand Down
26 changes: 13 additions & 13 deletions lib/src/client_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ import 'package:deno_postgres_interop/src/connection_options.dart';
import 'package:deno_postgres_interop/src/tls_options.dart';
import 'package:deno_postgres_interop/src/transport.dart';

/// [deno-postgres@v0.17.0/ClientConfiguration](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration).
/// [deno-postgres@v​0.17.0/ClientConfiguration](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration).
@JS()
class ClientConfiguration {
/// [deno-postgres@v0.17.0/ClientConfiguration/applicationName](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_applicationName).
/// [deno-postgres@v​0.17.0/ClientConfiguration/applicationName](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_applicationName).
external String get applicationName;

/// [deno-postgres@v0.17.0/ClientConfiguration/connection](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_connection).
/// [deno-postgres@v​0.17.0/ClientConfiguration/connection](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_connection).
external ConnectionOptions get connection;

/// [deno-postgres@v0.17.0/ClientConfiguration/database](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_database).
/// [deno-postgres@v​0.17.0/ClientConfiguration/database](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_database).
external String get database;

/// [deno-postgres@v0.17.0/ClientConfiguration/hostname](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_hostname).
/// [deno-postgres@v​0.17.0/ClientConfiguration/hostname](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_hostname).
external String get hostname;

/// [deno-postgres@v0.17.0/ClientConfiguration/options](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_options).
/// [deno-postgres@v​0.17.0/ClientConfiguration/options](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_options).
external Map<String, String> get options;

/// [deno-postgres@v0.17.0/ClientConfiguration/password](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_password).
/// [deno-postgres@v​0.17.0/ClientConfiguration/password](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_password).
external String? get password;

/// [deno-postgres@v0.17.0/ClientConfiguration/port](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_port).
/// [deno-postgres@v​0.17.0/ClientConfiguration/port](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_port).
external int get port;

/// [deno-postgres@v0.17.0/ClientConfiguration/tls](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_tls).
/// [deno-postgres@v​0.17.0/ClientConfiguration/tls](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_tls).
external TLSOptions get tls;

/// [deno-postgres@v0.17.0/ClientConfiguration/user](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_user).
/// [deno-postgres@v​0.17.0/ClientConfiguration/user](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_user).
external String get user;

/// [deno-postgres@v0.17.0/ClientConfiguration](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration).
/// [deno-postgres@v​0.17.0/ClientConfiguration](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration).
factory ClientConfiguration({
required String applicationName,
required ConnectionOptions connection,
Expand All @@ -62,8 +62,8 @@ class ClientConfiguration {
}) as ClientConfiguration;
}

/// [deno-postgres@v0.17.0/ClientConfiguration](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration).
/// [deno-postgres@v​0.17.0/ClientConfiguration](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration).
extension ClientConfigurationProps on ClientConfiguration {
/// [deno-postgres@v0.17.0/ClientConfiguration/host_type](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_host_type).
/// [deno-postgres@v​0.17.0/ClientConfiguration/host_type](https://deno.land/x/postgres@v0.17.0/connection/connection_params.ts?s=ClientConfiguration#prop_host_type).
Transport get hostType => Transport.parse(getProperty(this, 'host_type'));
}
30 changes: 15 additions & 15 deletions lib/src/client_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ import 'package:deno_postgres_interop/src/partial/partial_connection_options.dar
import 'package:deno_postgres_interop/src/partial/partial_tls_options.dart';
import 'package:deno_postgres_interop/src/transport.dart';

/// [deno-postgres@v0.17.0/ClientOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions).
/// [deno-postgres@v​0.17.0/ClientOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions).
@JS()
class ClientOptions {
/// [deno-postgres@v0.17.0/ClientOptions/applicationName](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_applicationName).
/// [deno-postgres@v​0.17.0/ClientOptions/applicationName](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_applicationName).
external String? get applicationName;

/// [deno-postgres@v0.17.0/ClientOptions/database](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_database).
/// [deno-postgres@v​0.17.0/ClientOptions/database](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_database).
external String? get database;

/// [deno-postgres@v0.17.0/ClientOptions/hostname](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_hostname).
/// [deno-postgres@v​0.17.0/ClientOptions/hostname](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_hostname).
external String? get hostname;

/// [deno-postgres@v0.17.0/ClientOptions/password](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_password).
/// [deno-postgres@v​0.17.0/ClientOptions/password](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_password).
external String? get password;

/// [deno-postgres@v0.17.0/ClientOptions/user](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_applicationName/user).
/// [deno-postgres@v​0.17.0/ClientOptions/user](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_applicationName/user).
external String? get user;

/// [deno-postgres@v0.17.0/ClientOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions).
/// [deno-postgres@v​0.17.0/ClientOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions).
factory ClientOptions({
String? applicationName,
PartialConnectionOptions? connection,
Expand Down Expand Up @@ -64,12 +64,12 @@ class ClientOptions {
}
}

/// [deno-postgres@v0.17.0/ClientOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions).
/// [deno-postgres@v​0.17.0/ClientOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions).
extension ClientOptionsProps on ClientOptions {
/// [deno-postgres@v0.17.0/ClientOptions/host_type](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_host_type).
/// [deno-postgres@v​0.17.0/ClientOptions/host_type](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_host_type).
Transport get hostType => Transport.parse(getProperty(this, 'host_type'));

/// [deno-postgres@v0.17.0/ClientOptions/options](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_options).
/// [deno-postgres@v​0.17.0/ClientOptions/options](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_options).
///
/// Either this or [optionsMap] is null.
String? get optionsString {
Expand All @@ -78,7 +78,7 @@ extension ClientOptionsProps on ClientOptions {
return prop is String ? prop : null;
}

/// [deno-postgres@v0.17.0/ClientOptions/options](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_options).
/// [deno-postgres@v​0.17.0/ClientOptions/options](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_options).
///
/// Either this or [optionsString] is null.
Map<String, String>? get optionsMap {
Expand All @@ -87,7 +87,7 @@ extension ClientOptionsProps on ClientOptions {
return prop is String ? null : prop as Map<String, String>;
}

/// [deno-postgres@v0.17.0/ClientOptions/port](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_port).
/// [deno-postgres@v​0.17.0/ClientOptions/port](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_port).
///
/// Either this or [port] is null.
String? get portString {
Expand All @@ -96,7 +96,7 @@ extension ClientOptionsProps on ClientOptions {
return prop is String ? prop : null;
}

/// [deno-postgres@v0.17.0/ClientOptions/port](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_port).
/// [deno-postgres@v​0.17.0/ClientOptions/port](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_port).
///
/// Either this or [portString] is null.
int? get port {
Expand All @@ -105,15 +105,15 @@ extension ClientOptionsProps on ClientOptions {
return prop is int ? prop : null;
}

/// [deno-postgres@v0.17.0/ClientOptions/connection](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_connection).
/// [deno-postgres@v​0.17.0/ClientOptions/connection](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_connection).
PartialConnectionOptions? get connection {
final map =
dartify(getProperty(this, 'connection')) as Map<dynamic, dynamic>?;

return map == null ? null : PartialConnectionOptions.fromMap(map);
}

/// [deno-postgres@v0.17.0/ClientOptions/tls](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_tls).
/// [deno-postgres@v​0.17.0/ClientOptions/tls](https://deno.land/x/postgres@v0.17.0/mod.ts?s=ClientOptions#prop_tls).
PartialTLSOptions? get tls {
final map =
dartify(getProperty(this, 'connection')) as Map<dynamic, dynamic>?;
Expand Down
20 changes: 10 additions & 10 deletions lib/src/column.dart
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import 'dart:js_interop';
import 'dart:js_util';

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
@JS()
class Column {
/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
external String get name;

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
external int get tableOid;

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
external int get index;

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
external int get typeOid;

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
external int get columnLength;

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
external int get typeModifier;

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column#ctor_0).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column#ctor_0).
factory Column({
required String name,
required int tableOid,
Expand All @@ -43,9 +43,9 @@ class Column {
]);
}

/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
extension ColumnProps on Column {
/// [deno-postgres@v0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
/// [deno-postgres@v​0.17.0/Column](https://deno.land/x/postgres@v0.17.0/query/decode.ts?s=Column).
ColumnFormat get format => ColumnFormat.values
.firstWhere((e) => e.id == getProperty(this, 'format'));
}
Expand Down
Loading

0 comments on commit e758aa1

Please sign in to comment.