Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
danylo-safonov-solid committed Sep 21, 2023
1 parent b0810ce commit 49e84a5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/src/transaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> 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<void> commit() => callFutureMethod(this, 'commit');
Future<void> 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<String> getActiveSavepointsNames() =>
Expand Down

0 comments on commit 49e84a5

Please sign in to comment.