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.

Sql.transaction is unnecessary

See original GitHub issue

If we create a transaction using connection.BeginTransaction(), then the connection is attached to the transaction. Therefore, we can just use Sql.existingConnection in every sql statements afterward. Moreover, we can remove Transaction from ExecutionTarget.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Zaid-Ajajcommented, Mar 5, 2021

I agree that Sql.transaction is redundant. I think we can deprecate it (not entirely remove it) in the next major version but I will probably need to add a proper documentation website to showcase the different scenarios and how to properly work with transactions.

0reactions
Zaid-Ajajcommented, Mar 14, 2021

Removed as of v4.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is a bad practice to create a transaction always? [duplicate]
You should never have a transaction unless you are changing data in the database. Read uncommitted isolation level is also a very poor...
Read more >
A Primer on SQL Transactions | Linode Docs
SQL transactions help maintain database integrity. This guide outlines some transaction benefits and ... Why are SQL Transactions Necessary?
Read more >
Remove Unnecessary SQL Server Transaction Log Files
Learn how to determine SQL Server Transaction Log usage and how to remove unnecessary SQL Server transaction log files.
Read more >
Why would you want to name a transaction?
transaction_name is always case sensitive, even when the instance of SQL Server is not case sensitive. The full list is: A Mess of...
Read more >
Deferred Transactions (SQL Server)
In SQL Server Enterprise, a corrupted transaction can become deferred if data required by rollback (undo) is offline during database startup. A ...
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