-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6320938
commit a84b790
Showing
3 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
enum IsolationLevel { | ||
readCommited, | ||
repeatableRead, | ||
serializable; | ||
|
||
static IsolationLevel parse(String string) => | ||
values.firstWhere((e) => e.name == string); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import 'dart:js_interop'; | ||
import 'dart:js_util'; | ||
|
||
import 'package:deno_postgres_interop/src/isolation_level.dart'; | ||
|
||
/// [[email protected]/TransactionOptions](https://deno.land/x/[email protected]/mod.ts?s=TransactionOptions) | ||
@JS() | ||
class TransactionOptions { | ||
|
@@ -20,6 +22,7 @@ class TransactionOptions { | |
}) as TransactionOptions; | ||
} | ||
|
||
/// [[email protected]/TransactionOptions](https://deno.land/x/[email protected]/mod.ts?s=TransactionOptions) | ||
extension TransactionOptionsProps on TransactionOptions { | ||
IsolationLevel? get isolationLevel { | ||
final jsProperty = getProperty<String?>(this, 'isolation_level'); | ||
|
@@ -29,12 +32,3 @@ extension TransactionOptionsProps on TransactionOptions { | |
|
||
bool? get isReadOnly => getProperty(this, 'read_only'); | ||
} | ||
|
||
enum IsolationLevel { | ||
readCommited, | ||
repeatableRead, | ||
serializable; | ||
|
||
static IsolationLevel parse(String string) => | ||
values.firstWhere((e) => e.name == string); | ||
} |