diff --git a/lib/deno_postgres_interop.dart b/lib/deno_postgres_interop.dart index 810ed70..adabff9 100644 --- a/lib/deno_postgres_interop.dart +++ b/lib/deno_postgres_interop.dart @@ -4,17 +4,26 @@ library; export 'src/client.dart'; export 'src/client_configuration.dart'; export 'src/client_options.dart'; +export 'src/column.dart'; export 'src/command_type.dart'; +export 'src/connection.dart'; export 'src/connection_options.dart'; +export 'src/encoded_arg.dart'; export 'src/isolation_level.dart'; +export 'src/notice.dart'; export 'src/partial/partial_connection_options.dart'; export 'src/partial/partial_tls_options.dart'; export 'src/pool.dart'; export 'src/pool_client.dart'; export 'src/query.dart'; +export 'src/query_array_result.dart'; export 'src/query_client.dart'; export 'src/query_object_result.dart'; export 'src/query_result.dart'; +export 'src/result_type.dart'; +export 'src/row_description.dart'; +export 'src/savepoint.dart'; +export 'src/session.dart'; export 'src/tls_options.dart'; export 'src/transaction.dart'; export 'src/transaction_options.dart'; diff --git a/lib/src/client.dart b/lib/src/client.dart index d989c45..dd66f08 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1,5 +1,7 @@ import 'dart:js_interop'; +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). @@ -7,4 +9,11 @@ import 'package:deno_postgres_interop/src/query_client.dart'; 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). 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). + 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). + factory Client.empty() => callConstructor('Client', null); } diff --git a/lib/src/connection.dart b/lib/src/connection.dart new file mode 100644 index 0000000..2fca61e --- /dev/null +++ b/lib/src/connection.dart @@ -0,0 +1,50 @@ +import 'dart:js_interop'; +import 'dart:js_util'; + +import 'package:deno_postgres_interop/src/client_configuration.dart'; +import 'package:deno_postgres_interop/src/promise.dart'; +import 'package:deno_postgres_interop/src/query.dart'; +import 'package:deno_postgres_interop/src/query_result.dart'; +import 'package:deno_postgres_interop/src/transport.dart'; +import 'package:deno_postgres_interop/src/util.dart'; + +/// [deno-postgres@v0.17.0/Connection](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection). +@JS() +class Connection { + /// [deno-postgres@v0.17.0/Connection/connected](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#accessor_pid). + external int get pid; + + /// [deno-postgres@v0.17.0/Connection/constructor](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#ctor_0). + factory Connection({ + required ClientConfiguration connectionParams, + required Future Function() disconnectionCallback, + }) => + callConstructor( + 'Connection', + [connectionParams, () => futureToPromise(disconnectionCallback())], + ); +} + +/// [deno-postgres@v0.17.0/Connection](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection). +extension ConnectionProps on Connection { + /// [deno-postgres@v0.17.0/Connection/connected](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#prop_connected). + bool get isConnected => getProperty(this, 'connected'); + + /// [deno-postgres@v0.17.0/Connection/tls](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#accessor_tls). + bool get isCarriedOverTLS => getProperty(this, 'tls'); + + /// [deno-postgres@v0.17.0/Connection/transport](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#accessor_transport). + Transport get transport => Transport.parse(getProperty(this, 'transport')); + + /// [deno-postgres@v0.17.0/Connection/end](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#method_end_0). + Future end() => callFutureMethod(this, 'end'); + + /// [deno-postgres@v0.17.0/Connection/query](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#method_query_0). + /// [deno-postgres@v0.17.0/Connection/query](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#method_query_1). + Future queryArray(Query query) => + callFutureMethod(this, 'query', [query]); + + /// [deno-postgres@v0.17.0/Connection/startup](https://deno.land/x/postgres@v0.17.0/connection/connection.ts?s=Connection#method_startup_0). + Future startup({required bool isReconnection}) => + callFutureMethod(this, 'startup', [isReconnection]); +} diff --git a/lib/src/notice.dart b/lib/src/notice.dart index a1579ef..70fedf5 100644 --- a/lib/src/notice.dart +++ b/lib/src/notice.dart @@ -1,61 +1,61 @@ import 'dart:js_interop'; import 'dart:js_util'; -/// [postgres@v0.17.0/Notice](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice). +/// [deno-postgres@v0.17.0/Notice](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice). @JS() class Notice { - /// [postgres@v0.17.0/Notice/severity](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_severity). + /// [deno-postgres@v0.17.0/Notice/severity](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_severity). external String get severity; - /// [postgres@v0.17.0/Notice/code](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_code). + /// [deno-postgres@v0.17.0/Notice/code](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_code). external String get code; - /// [postgres@v0.17.0/Notice/message](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_message). + /// [deno-postgres@v0.17.0/Notice/message](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_message). external String get message; - /// [postgres@v0.17.0/Notice/detail](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_detail). + /// [deno-postgres@v0.17.0/Notice/detail](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_detail). external String? get detail; - /// [postgres@v0.17.0/Notice/hint](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_hint). + /// [deno-postgres@v0.17.0/Notice/hint](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_hint). external String? get hint; - /// [postgres@v0.17.0/Notice/position](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_position). + /// [deno-postgres@v0.17.0/Notice/position](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_position). external String? get position; - /// [postgres@v0.17.0/Notice/internalPosition](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_internalPosition). + /// [deno-postgres@v0.17.0/Notice/internalPosition](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_internalPosition). external String? get internalPosition; - /// [postgres@v0.17.0/Notice/internalQuery](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_internalQuery). + /// [deno-postgres@v0.17.0/Notice/internalQuery](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_internalQuery). external String? get internalQuery; - /// [postgres@v0.17.0/Notice/where](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_where). + /// [deno-postgres@v0.17.0/Notice/where](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_where). external String? get where; - /// [postgres@v0.17.0/Notice/schema](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_schema). + /// [deno-postgres@v0.17.0/Notice/schema](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_schema). external String? get schema; - /// [postgres@v0.17.0/Notice/table](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_table). + /// [deno-postgres@v0.17.0/Notice/table](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_table). external String? get table; - /// [postgres@v0.17.0/Notice/column](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_column). + /// [deno-postgres@v0.17.0/Notice/column](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_column). external String? get column; - /// [postgres@v0.17.0/Notice/dataType](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_dataType). + /// [deno-postgres@v0.17.0/Notice/dataType](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_dataType). external String? get dataType; - /// [postgres@v0.17.0/Notice/constraint](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_constraint). + /// [deno-postgres@v0.17.0/Notice/constraint](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_constraint). external String? get constraint; - /// [postgres@v0.17.0/Notice/file](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_file). + /// [deno-postgres@v0.17.0/Notice/file](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_file). external String? get file; - /// [postgres@v0.17.0/Notice/line](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_line). + /// [deno-postgres@v0.17.0/Notice/line](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_line). external String? get line; - /// [postgres@v0.17.0/Notice/routine](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_routine). + /// [deno-postgres@v0.17.0/Notice/routine](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice#prop_routine). external String? get routine; - /// [postgres@v0.17.0/Notice](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice). + /// [deno-postgres@v0.17.0/Notice](https://deno.land/x/postgres@v0.17.0/connection/message.ts?s=Notice). factory Notice({ required String severity, required String code, diff --git a/lib/src/pool.dart b/lib/src/pool.dart index 5669484..7309075 100644 --- a/lib/src/pool.dart +++ b/lib/src/pool.dart @@ -1,3 +1,4 @@ +import 'dart:js_interop'; import 'dart:js_util'; import 'package:deno_postgres_interop/src/client_options.dart'; @@ -6,6 +7,7 @@ import 'package:deno_postgres_interop/src/undefined.dart'; import 'package:deno_postgres_interop/src/util.dart'; /// [deno-postgres@v0.17.0/Pool](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Pool). +@JS() class Pool { /// [deno-postgres@v0.17.0/Pool/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Pool#ctor_0). factory Pool({ diff --git a/lib/src/promise.dart b/lib/src/promise.dart new file mode 100644 index 0000000..e8d3998 --- /dev/null +++ b/lib/src/promise.dart @@ -0,0 +1,21 @@ +import 'dart:js_interop'; +import 'dart:js_util'; + +typedef _Resolver = void Function(T result); +typedef _Executor = void Function(_Resolver resolve, Function reject); + +/// JS [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) interop. +@JS() +class Promise { + /// [js/Promise/constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise). + external Promise(_Executor executor); +} + +/// Convert darts [Future] to js' [Promise]. +Promise futureToPromise(Future future) { + return Promise( + allowInterop((resolve, reject) { + future.then(resolve, onError: reject); + }), + ); +} diff --git a/lib/src/query_client.dart b/lib/src/query_client.dart index d30d8e2..4482bc6 100644 --- a/lib/src/query_client.dart +++ b/lib/src/query_client.dart @@ -2,19 +2,36 @@ import 'dart:js_interop'; import 'dart:js_util'; import 'package:deno_postgres_interop/src/client_common.dart'; +import 'package:deno_postgres_interop/src/connection.dart'; import 'package:deno_postgres_interop/src/query_array_result.dart'; 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/session.dart'; import 'package:deno_postgres_interop/src/transaction.dart'; import 'package:deno_postgres_interop/src/transaction_options.dart'; import 'package:deno_postgres_interop/src/util.dart'; /// [deno-postgres@v0.17.0/QueryClient](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient). @JS() -class QueryClient {} +class QueryClient { + /// [deno-postgres@v0.17.0/QueryClient/session](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#accessor_session). + external Session get session; + + /// [deno-postgres@v0.17.0/QueryClient/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#ctor_0). + external factory QueryClient(Connection connection); +} /// [deno-postgres@v0.17.0/QueryClient](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient). extension QueryClientProps on QueryClient { + /// [deno-postgres@v0.17.0/QueryClient/connected](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#accessor_connected). + bool get isConnected => getProperty(this, 'connected'); + + /// [deno-postgres@v0.17.0/QueryClient/closeConnection](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_closeConnection_0). + Future closeConnection() => callFutureMethod(this, 'closeConnection'); + + /// [deno-postgres@v0.17.0/QueryClient/resetSessionMetadata](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_resetSessionMetadata_0). + void resetSessionMetadata() => callMethod(this, 'resetSessionMetadata', []); + /// [deno-postgres@v0.17.0/QueryClient/connect](https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient#method_connect_0). Future connect() => callFutureMethod(this, 'connect'); diff --git a/lib/src/savepoint.dart b/lib/src/savepoint.dart new file mode 100644 index 0000000..b80d2db --- /dev/null +++ b/lib/src/savepoint.dart @@ -0,0 +1,33 @@ +import 'dart:js_interop'; +import 'dart:js_util'; + +import 'package:deno_postgres_interop/src/promise.dart'; +import 'package:deno_postgres_interop/src/util.dart'; + +/// [deno-postgres@v0.17.0/Savepoint](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Savepoint). +@JS() +class Savepoint { + /// [deno-postgres@v0.17.0/Savepoint/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Savepoint#ctor_0). + factory Savepoint( + String name, + Future Function(String name) updateCallback, + Future Function(String name) releaseCallback, + ) => + callConstructor('Savepoint', [ + name, + (String name) => futureToPromise(updateCallback(name)), + (String name) => futureToPromise(releaseCallback(name)), + ]); +} + +/// [deno-postgres@v0.17.0/Savepoint](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Savepoint). +extension SavepointProps on Savepoint { + /// [deno-postgres@v0.17.0/Savepoint/instances](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Savepoint#accessor_instances). + int get instancesCount => getProperty(this, 'instances'); + + /// [deno-postgres@v0.17.0/Savepoint/instances](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Savepoint#method_release_0). + Future release() => callFutureMethod(this, 'release'); + + /// [deno-postgres@v0.17.0/Savepoint/instances](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Savepoint#method_update_0). + Future update() => callFutureMethod(this, 'update'); +} diff --git a/lib/src/session.dart b/lib/src/session.dart new file mode 100644 index 0000000..083fb31 --- /dev/null +++ b/lib/src/session.dart @@ -0,0 +1,27 @@ +import 'dart:js_interop'; +import 'dart:js_util'; + +import 'package:deno_postgres_interop/src/transport.dart'; + +/// [deno-postgres@v0.17.0/Session](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Session). +@JS() +class Session { + /// [deno-postgres@v0.17.0/Session/pid](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Session#prop_pid) + external int? get pid; + + /// [deno-postgres@v0.17.0/Session/tls](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Session#prop_tls) + external bool? get tls; +} + +/// [deno-postgres@v0.17.0/Session](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Session). +extension SessionProps on Session { + /// [deno-postgres@v0.17.0/Session/current_transaction](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Session#prop_current_transaction) + String? get currentTransacton => getProperty(this, 'current_transaction'); + + /// [deno-postgres@v0.17.0/Session/transport](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Session#prop_transport) + Transport? get transport { + final string = getProperty(this, 'transport'); + + return string == null ? null : Transport.parse(string); + } +} diff --git a/lib/src/transaction.dart b/lib/src/transaction.dart index b0b0aa5..abe9455 100644 --- a/lib/src/transaction.dart +++ b/lib/src/transaction.dart @@ -1,22 +1,73 @@ import 'dart:js_interop'; +import 'dart:js_util'; import 'package:deno_postgres_interop/src/client_common.dart'; +import 'package:deno_postgres_interop/src/isolation_level.dart'; +import 'package:deno_postgres_interop/src/promise.dart'; +import 'package:deno_postgres_interop/src/query.dart'; import 'package:deno_postgres_interop/src/query_array_result.dart'; +import 'package:deno_postgres_interop/src/query_client.dart'; 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/query_result.dart'; +import 'package:deno_postgres_interop/src/savepoint.dart'; +import 'package:deno_postgres_interop/src/transaction_options.dart'; +import 'package:deno_postgres_interop/src/undefined.dart'; import 'package:deno_postgres_interop/src/util.dart'; /// [deno-postgres@v0.17.0/Transaction](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction). @JS() -class Transaction {} +class Transaction { + /// [deno-postgres@v0.17.0/Transaction/savepoints](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#accessor_savepoints). + external List get savepoints; + + /// [deno-postgres@v0.17.0/Transaction/construtor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#ctor_0). + factory Transaction({ + required String name, + required QueryClient client, + required Future Function(Query query) executeQueryCallback, + required void Function(String? name) updateClientLockCallback, + TransactionOptions? options, + }) => + callConstructor( + 'Transaction', + [ + name, + if (options != null) options else undefined, + client, + (Query query) => futureToPromise(executeQueryCallback(query)), + updateClientLockCallback, + ], + ); + + /// [deno-postgres@v0.17.0/Transaction/getSavepoint](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_getSavepoint_0). + external Savepoint? getSavepoint(String name); +} /// [deno-postgres@v0.17.0/Transaction](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction). extension TransactionProps on Transaction { + /// [deno-postgres@v0.17.0/Transaction/isolation_level](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#accessor_isolation_level). + IsolationLevel get isolationLevel => + IsolationLevel.parse(getProperty(this, 'isolation_name')); + /// [deno-postgres@v0.17.0/Transaction/begin](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_begin_0). Future begin() => callFutureMethod(this, 'begin'); /// [deno-postgres@v0.17.0/Transaction/commit](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_commit_0). - Future commit() => callFutureMethod(this, 'commit'); + Future commit({bool? chain}) => callFutureMethod( + this, + 'commit', + [ + if (chain != null) {'chain': chain}, + ], + ); + + /// [deno-postgres@v0.17.0/Transaction/getSavepoints](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_getSavepoints_0). + List getActiveSavepointsNames() => + callMethod(this, 'getSavepoints', []); + + /// [deno-postgres@v0.17.0/Transaction/getSnapshot](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_getSnapshot_0). + Future get snapshot => callFutureMethod(this, 'getSnapshot'); /// [deno-postgres@v0.17.0/Transaction/queryArray](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryArray_0). Future> queryArray>( @@ -31,6 +82,34 @@ extension TransactionProps on Transaction { ) => ClientCommon.queryArrayWithOptions(this, config); + /// [deno-postgres@v0.17.0/Transaction/rollback](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_rollback_0). + Future rollback([Savepoint? savepoint]) => callFutureMethod( + this, + 'rollback', + [if (savepoint != null) savepoint], + ); + + // [deno-postgres@v0.17.0/Transaction/rollback](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_rollback_1). + // this has the same functionality as [rollback] and [rollbackByName] + // so it won't be implemented. + + /// [deno-postgres@v0.17.0/Transaction/rollback](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_rollback_2). + Future rollbackWithChain() => callFutureMethod( + this, + 'rollback', + [ + jsify({'chain': true}), + ], + ); + + /// [deno-postgres@v0.17.0/Transaction/rollback](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_rollback_0). + Future rollbackByName(String savepoint) => + callFutureMethod(this, 'rollback', [savepoint]); + + /// [deno-postgres@v0.17.0/Transaction/savepoint](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_savepoint_0). + Future createSavepoint(String name) => + callFutureMethod(this, 'savepoint', [name]); + /// [deno-postgres@v0.17.0/Transaction/queryObject](https://deno.land/x/postgres@v0.17.0/mod.ts?s=Transaction#method_queryObject_0). Future> queryObject( String query, [