question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set transaction isolation level

See original GitHub issue

It’d be nice to have a way to specify the isolation level on the transaction

Also mentioned by @llambda in #138, it’d be nice to have both a better api for injecting connection specific config default settings (currently it’s possible with an afterCreate hook)

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:3
  • Comments:27 (13 by maintainers)

github_iconTop GitHub Comments

10reactions
ayroblucommented, Dec 30, 2020

Implemented as knex.transaction({isolationLevel: 'repeatable read'}) and similar FYI

5reactions
Recodifycommented, Jul 8, 2019

For mysql you can simply do:

 await knex.raw('SET TRANSACTION ISOLATION LEVEL READ COMMITTED;');
        await knex.transaction(async (trx) => {
              ...

This will set the transaction isolation level to READ COMMITTED for the next transaction only. See the section ‘Transaction Characteristic’ on: https://dev.mysql.com/doc/refman/8.0/en/set-transaction.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

SET TRANSACTION ISOLATION LEVEL (Transact-SQL)
Specifies that statements can read rows that have been modified by other transactions but not yet committed. Transactions running at the READ ...
Read more >
13.3.7 SET TRANSACTION Statement
To set the global isolation level at server startup, use the --transaction-isolation= level option on the command line or in an option file....
Read more >
SET TRANSACTION - IBM
The SET TRANSACTION statement sets the isolation level, read only attribute, or diagnostics area size for the current unit of work.
Read more >
SET TRANSACTION - MariaDB Knowledge Base
This statement sets the transaction isolation level or the transaction access mode globally, for the current session, or for the next transaction:.
Read more >
Transaction Isolation Levels in DBMS - GeeksforGeeks
Read Uncommitted – Read Uncommitted is the lowest isolation level. In this level, one transaction may read not yet committed changes made by ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found