Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for varying syntax of SELECT locking clauses. #154

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Aug 2, 2022

The FOR SHARE syntax previously provided by adding .for(.share) to a SELECT query is specific to PostgreSQL. This update allows each database driver to specify the correct syntax for locking clauses - or to signal that it doesn't implement that functionality - via its SQLDialect. The default is to assume locking clauses are not supported.

Because new public API is added to SQLStatement and SQLDialect, this update is semver-minor.

PR for MySQL support: vapor/mysql-kit#310
PR for PostgreSQL support: vapor/postgres-kit#230
PR for SQLite support: <not required, SQLite does not support locking clauses>

gwynne added 2 commits August 2, 2022 14:46
… SQLDialect, including specifying lack of support (such as in SQLite). Update doc comments for locking clauses somewhat. Add missing test coverage of locking clause.
@gwynne gwynne added enhancement New feature or request semver-minor Contains new APIs labels Aug 2, 2022
@gwynne gwynne requested review from 0xTim and jdmcd August 2, 2022 20:11
@gwynne gwynne self-assigned this Aug 2, 2022
@gwynne gwynne merged commit 3c5413a into main Aug 2, 2022
@gwynne gwynne deleted the multi-dialect-locking-clauses branch August 2, 2022 21:00
@VaporBot
Copy link

VaporBot commented Aug 2, 2022

These changes are now available in 3.21.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants