Skip to content

pessimistic_write_or_fail / pessimistic_partial_write lock option not implemented for MySQL #6530

@jokester

Description

@jokester

Issue type:

[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x] 0.2.25


Currently the 2 lock options are only implemented for postgres: SelectQueryBuilder

It seems that the same behavior can be implemented for recent MySQL like (I'm not a database guru, corrections welcome)

pessimistic_write_or_fail   --  SELECT ... FOR UPDATE NOWAIT
pessimistic_partial_write  -- SELECT ... FOR UPDATE SKIP LOCKED

see:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions