Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danylo-safonov-solid committed Sep 13, 2023
1 parent a84b790 commit 94c408f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/transaction_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:deno_postgres_interop/src/isolation_level.dart';
/// [postgres@v0.17.0/TransactionOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
@JS()
class TransactionOptions {
/// [postgres@v0.17.0/TransactionOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
/// [postgres@v0.17.0/TransactionOptions/snapshot](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
external String? get snapshot;

/// [postgres@v0.17.0/TransactionOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
/// [postgres@v0.17.0/TransactionOptions/constructor](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
factory TransactionOptions({
IsolationLevel? isolationLevel,
bool? isReadOnly,
Expand All @@ -24,11 +24,13 @@ class TransactionOptions {

/// [postgres@v0.17.0/TransactionOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
extension TransactionOptionsProps on TransactionOptions {
/// [postgres@v0.17.0/TransactionOptions/isolation_level](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
IsolationLevel? get isolationLevel {
final jsProperty = getProperty<String?>(this, 'isolation_level');

return jsProperty == null ? null : IsolationLevel.parse(jsProperty);
}

/// [postgres@v0.17.0/TransactionOptions/read_only](https://deno.land/x/postgres@v0.17.0/mod.ts?s=TransactionOptions)
bool? get isReadOnly => getProperty(this, 'read_only');
}

0 comments on commit 94c408f

Please sign in to comment.