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

Support `BEGIN EXCLUSIVE` or `BEGIN IMMEDIATE` for Sqlite. #1356

Closed
Lymia opened this Issue Dec 6, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@Lymia

Lymia commented Dec 6, 2017

Sqlite uses relatively weak locking by default when just BEGIN is used to start a transaction. Normally, you would use BEGIN EXCLUSIVE or BEGIN IMMEDIATE rather than BEGIN to do such a transaction with stronger locking, however, Diesel has no support for using these.

@sgrif sgrif changed the title from No support for `BEGIN EXCLUSIVE` or `BEGIN IMMEDIATE` for Sqlite. to Support `BEGIN EXCLUSIVE` or `BEGIN IMMEDIATE` for Sqlite. Dec 6, 2017

@sgrif sgrif added the hole in api label Dec 6, 2017

@sgrif

This comment has been minimized.

Member

sgrif commented Dec 16, 2017

Ideally we'd handle this and #408 at the same time.

sgrif added a commit that referenced this issue Jan 7, 2018

Support specifying details about a PG transaction
This adds support for all options which can be given to `SET
TRANSACTION`. We only expose an API for this when opening the
transaction though, as `SET TRANSACTION` errors unless it's the first
query run after opening the transaction.

Most of the tests are really just there to make sure the code compiles
and generates valid SQL. Seeing *a* usage example is still worth having,
but I don't think we can effectively demonstrate/test the differences
between isolation levels in a reasonable manner.

This lays some groundwork that will also be used by #1356, but I haven't
implemented SQLite support yet. The APIs for this will be backend
specific, not trait based.

Fixes #408.

sgrif added a commit that referenced this issue Jan 7, 2018

Support specifying details about a PG transaction
This adds support for all options which can be given to `SET
TRANSACTION`. We only expose an API for this when opening the
transaction though, as `SET TRANSACTION` errors unless it's the first
query run after opening the transaction.

Most of the tests are really just there to make sure the code compiles
and generates valid SQL. Seeing *a* usage example is still worth having,
but I don't think we can effectively demonstrate/test the differences
between isolation levels in a reasonable manner.

This lays some groundwork that will also be used by #1356, but I haven't
implemented SQLite support yet. The APIs for this will be backend
specific, not trait based.

Fixes #408.

sgrif added a commit that referenced this issue Jan 7, 2018

Support specifying details about a PG transaction
This adds support for all options which can be given to `SET
TRANSACTION`. We only expose an API for this when opening the
transaction though, as `SET TRANSACTION` errors unless it's the first
query run after opening the transaction.

Most of the tests are really just there to make sure the code compiles
and generates valid SQL. Seeing *a* usage example is still worth having,
but I don't think we can effectively demonstrate/test the differences
between isolation levels in a reasonable manner.

This lays some groundwork that will also be used by #1356, but I haven't
implemented SQLite support yet. The APIs for this will be backend
specific, not trait based.

Fixes #408.

sgrif added a commit that referenced this issue Jan 17, 2018

Support specifying details about a PG transaction
This adds support for all options which can be given to `SET
TRANSACTION`. We only expose an API for this when opening the
transaction though, as `SET TRANSACTION` errors unless it's the first
query run after opening the transaction.

Most of the tests are really just there to make sure the code compiles
and generates valid SQL. Seeing *a* usage example is still worth having,
but I don't think we can effectively demonstrate/test the differences
between isolation levels in a reasonable manner.

This lays some groundwork that will also be used by #1356, but I haven't
implemented SQLite support yet. The APIs for this will be backend
specific, not trait based.

Fixes #408.

sgrif added a commit that referenced this issue Jan 18, 2018

Support specifying details about a PG transaction (#1462)
This adds support for all options which can be given to `SET
TRANSACTION`. We only expose an API for this when opening the
transaction though, as `SET TRANSACTION` errors unless it's the first
query run after opening the transaction.

Most of the tests are really just there to make sure the code compiles
and generates valid SQL. Seeing *a* usage example is still worth having,
but I don't think we can effectively demonstrate/test the differences
between isolation levels in a reasonable manner.

This lays some groundwork that will also be used by #1356, but I haven't
implemented SQLite support yet. The APIs for this will be backend
specific, not trait based.

Fixes #408.

sgrif added a commit that referenced this issue Jan 24, 2018

Add support for `BEGIN IMMEDIATE` and `BEGIN EXCLUSIVE` on SQLite
Much like the tests for the most of the PG modifiers, I don't think we
can reasonably demonstrate their behavior in the doc example. It's still
worth having an example to show some amount of usage though, and to test
that we are generating a syntactically valid query.

Fixes #1356.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment