From 49e84a5885b5829aeb62ecb6bf2dce8f27daeb58 Mon Sep 17 00:00:00 2001 From: danylo-safonov-solid Date: Thu, 21 Sep 2023 19:39:30 +0300 Subject: [PATCH] upd --- lib/src/transaction.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/src/transaction.dart b/lib/src/transaction.dart index ead4403..abe9455 100644 --- a/lib/src/transaction.dart +++ b/lib/src/transaction.dart @@ -47,13 +47,20 @@ class Transaction { /// [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 => getProperty(this, 'isolation_name'); + 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() =>