-
-
Notifications
You must be signed in to change notification settings - Fork 32k
sqlite: add getter to detect transactions #57925
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
Conversation
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: nodejs#57922
Review requested:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57925 +/- ##
=======================================
Coverage 90.26% 90.27%
=======================================
Files 630 630
Lines 185933 185942 +9
Branches 36450 36449 -1
=======================================
+ Hits 167829 167851 +22
- Misses 10972 10975 +3
+ Partials 7132 7116 -16
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -291,6 +291,15 @@ added: v23.11.0 | |||
|
|||
* {boolean} Whether the database is currently open or not. | |||
|
|||
### `database.isTransaction` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor semantics: is or in?
To my eyes, db.isTransaction
expands to "the database is a transaction?", which works semantically for eg. db.isOpen
, but doesn't seem quite right here. inTransaction
or activeTransaction
would fit the bill slightly better, imo.
Landed in 2e0ec72 |
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an isTransaction getter to the DatabaseSync class for determining if the database is currently within a transaction. Fixes: #57922 PR-URL: #57925 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]>
This commit adds an
isTransaction
getter to theDatabaseSync
class for determining if the database is currently within a transaction.Fixes: #57922