Skip to content
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

DB::beginTransaction assert()-ing #40

Open
SchaichAlonso opened this issue Oct 22, 2023 · 1 comment
Open

DB::beginTransaction assert()-ing #40

SchaichAlonso opened this issue Oct 22, 2023 · 1 comment
Labels
enhancement New feature or request query builder Query builder

Comments

@SchaichAlonso
Copy link
Contributor

SchaichAlonso commented Oct 22, 2023

Currently, TinyORM is asserting no other transaction on the same connection is in partially commited state when beginTransaction is invoked.

However, the Q_ASSERT statements are disabled when QT_NO_DEBUG is defined during compilation, i.e. when compiling in release mode. If TinyORM needs it's consumers to explicit distinction between top level transactions and truely nested transactions / savepoints, exceptions provide a more reliable error handling mechanism then assertions do

@SchaichAlonso SchaichAlonso changed the title DB::startTransaction assert()-ing DB::beginTransaction assert()-ing Oct 22, 2023
@silverqx
Copy link
Owner

This is true, this is one of the first code I wrote and it should be completely refactored to exceptions, i know about this here .

@silverqx silverqx added enhancement New feature or request query builder Query builder labels Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request query builder Query builder
Projects
None yet
Development

No branches or pull requests

2 participants