Add support for OF in row lock clauses

This adds support for statements such as `SELECT ... FOR UPDATE OF table NOWAIT` where `OF table`
could not be specified previously. Fixes #285.
This commit is contained in:
Matthew Dowdell 2023-11-30 07:52:54 +00:00
parent 6a13530ec1
commit f16f0b5e5d
4 changed files with 48 additions and 1 deletions

View file

@ -122,6 +122,11 @@ FOR UPDATE;
SELECT table1.col_bool AS "table1.col_bool"
FROM db.table1
FOR SHARE NOWAIT;
`)
testutils.AssertStatementSql(t, SELECT(table1ColBool).FROM(table1).FOR(UPDATE().OF(table1).NOWAIT()), `
SELECT table1.col_bool AS "table1.col_bool"
FROM db.table1
FOR UPDATE OF table1 NOWAIT;
`)
}