Skip to content

Add row-level locking options#1810

Merged
ricardograca merged 3 commits into
masterfrom
rg-transaction-locking
Apr 12, 2018
Merged

Add row-level locking options#1810
ricardograca merged 3 commits into
masterfrom
rg-transaction-locking

Conversation

@ricardograca

Copy link
Copy Markdown
Member

Introduction

Follow-up to the previous implementation on the linked PR.

Motivation and Proposed solution

This adds tests and uses a slightly different implementation that is less repetitive and more easily expandable if needed.

Closes #516.

Current PR Issues

Tests aren't very exhaustive.

There's also no check to see if the lock options are being applied to a select statement, but it's possible that Knex already takes care of this. In any case this is an advanced feature, so users that want it should know what they're doing.

- This only works inside a transaction and seems to make no effect on
MySQL where it will always lock even without the option.

- There's also no support for this feature on SQLite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant