We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Does it make sense to add support for transactions in similar manner to this
extension PostgresClient { func withTransaction<Value>(logger: Logger, _ process: (PostgresConnection) async throws -> Value) async throws -> Value { try await withConnection { connection in try await connection.query("BEGIN;", logger: logger) do { let value = try await process(connection) try await connection.query("COMMIT;", logger: logger) return value } catch { try await connection.query("ROLLBACK;", logger: logger) throw error } } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Does it make sense to add support for transactions in similar manner to this
The text was updated successfully, but these errors were encountered: