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
I wonder if it possible to auto commit a transaction without the need for calling tx.commit(). For example, instead of this:
db.begin() .flatMap(tx -> tx.querySet("insert into products (name) values ($1) returning id", "saw") .map(productsResult -> productsResult.row(0).getLong("id")) .flatMap(id -> tx.querySet("insert into promotions (product_id) values ($1)", id)) .flatMap(promotionsResult -> tx.commit()) ).subscribe( __ -> System.out.println("Transaction committed"), Throwable::printStackTrace);
would it be possible to have this:
boolean autoCommit = true; db.begin(autoCommit) .flatMap(tx -> tx.querySet("insert into products (name) values ($1) returning id", "saw") .map(productsResult -> productsResult.row(0).getLong("id")) .flatMap(id -> tx.querySet("insert into promotions (product_id) values ($1)", id)) ).subscribe( __ -> System.out.println("Transaction committed"), Throwable::printStackTrace);
The text was updated successfully, but these errors were encountered:
alaisi
No branches or pull requests
I wonder if it possible to auto commit a transaction without the need for calling tx.commit().
For example, instead of this:
would it be possible to have this:
The text was updated successfully, but these errors were encountered: