Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix comments #8

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/src/isolation_level.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// https://www.postgresql.org/docs/current/transaction-iso.html
/// [postgresql/Transaction Isolation](https://www.postgresql.org/docs/current/transaction-iso.html).
enum IsolationLevel {
/// [postgresql/Transaction Isolation/Read Committed Isolation Level](https://www.postgresql.org/docs/current/transaction-iso.html#XACT-READ-COMMITTED)
/// [postgresql/Transaction Isolation/Read Committed Isolation Level](https://www.postgresql.org/docs/current/transaction-iso.html#XACT-READ-COMMITTED).
readCommitted,

/// [postgresql/Transaction Isolation/Repeatable Read Isolation Level](https://www.postgresql.org/docs/current/transaction-iso.html#XACT-REPEATABLE-READ)
/// [postgresql/Transaction Isolation/Repeatable Read Isolation Level](https://www.postgresql.org/docs/current/transaction-iso.html#XACT-REPEATABLE-READ).
repeatableRead,

/// [postgresql/Transaction Isolation/Serializable Isolation Level](https://www.postgresql.org/docs/current/transaction-iso.html#XACT-SERIALIZABLE)
/// [postgresql/Transaction Isolation/Serializable Isolation Level](https://www.postgresql.org/docs/current/transaction-iso.html#XACT-SERIALIZABLE).
serializable;

/// Parses a string containing an [IsolationLevel] literal into its instance.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/query_object.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:deno_postgres_interop/deno_postgres_interop.dart';
import 'package:deno_postgres_interop/src/util.dart';

/// [postgres@v0.17.0/QueryArguments](https://deno.land/x/postgres@v0.17.0/query/query.ts?s=QueryArguments)
/// [postgres@v0.17.0/QueryArguments](https://deno.land/x/postgres@v0.17.0/query/query.ts?s=QueryArguments).
typedef QueryArguments = Object;

/// Common method between all Clients.
Expand Down
12 changes: 6 additions & 6 deletions lib/src/transaction_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import 'dart:js_util';

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)
/// [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/snapshot](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/constructor](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 @@ -22,15 +22,15 @@ class TransactionOptions {
}) as TransactionOptions;
}

/// [postgres@v0.17.0/TransactionOptions](https://deno.land/x/postgres@v0.17.0/mod.ts?s=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)
/// [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)
/// [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');
}
Loading