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

Support for transactions with BEGIN ... END and/or multi-insert statements #248

Open
jvdwrf opened this issue May 14, 2024 · 0 comments
Open

Comments

@jvdwrf
Copy link

jvdwrf commented May 14, 2024

Currently, it's possible to create transactions with rollback, however these transactions have to communicate multiple times with the database.

It would be great if transactions like the following would be supported:

--! multi_table_insert(param_a, param_b):
BEGIN;

INSERT INTO a (param_a) VALUES (:param_a);
INSERT INTO b (param_b) VALUES (:param_b);

COMMIT;

Additionally, support for statements with multiple INSERTs:

--! some_function(..)
WITH value AS (
    INSERT INTO ... VALUES ... RETURNING ...
) INSERT INTO ... VALUES ...;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant