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

Aperta
#248 0 commenti 8 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
postgresql, rust, sql
Ambito
backend, databases

Direzione di ricerca

Start by reading the repository’s transaction and SQL statement handling entry points; the issue does not name specific files or tests. Check how rollback transactions are currently generated and how queries with multiple INSERT statements are parsed. Done means supporting the shown BEGIN/COMMIT transaction and multi-INSERT forms while preserving type-checked Rust generation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 ...;
Lingua principale
Rust
Stelle
1.2k
Fork
77
Merge medio
5g 12h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cornucopia-rs/cornucopia

Tutte le issue di cornucopia-rs/cornucopia

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.