Skip to content

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

@jvdwrf

Description

@jvdwrf

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 ...;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions