From 8bafc43dc44d02a5dd049b634fb365c7d228d77b Mon Sep 17 00:00:00 2001 From: kulliax <116072312+kulliax@users.noreply.github.com> Date: Sat, 26 Jul 2025 09:54:13 +0000 Subject: [PATCH] support ignoreLocked --- apis/cqn.d.ts | 2 +- apis/ql.d.ts | 2 +- test/typescript/apis/project/cds-cqn.ts | 1 + test/typescript/apis/project/cds-ql.ts | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apis/cqn.d.ts b/apis/cqn.d.ts index a3037a6a..2390e106 100644 --- a/apis/cqn.d.ts +++ b/apis/cqn.d.ts @@ -19,7 +19,7 @@ export type SELECT = { SELECT: { having?: predicate, orderBy?: ordering_term[], limit?: { rows: val, offset: val }, - forUpdate?: { wait: number }, + forUpdate?: { wait: number, ignoreLocked: boolean }, forShareLock?: { wait: number }, search?: predicate, count?: boolean, diff --git a/apis/ql.d.ts b/apis/ql.d.ts index 184a8d82..0eb89948 100644 --- a/apis/ql.d.ts +++ b/apis/ql.d.ts @@ -101,7 +101,7 @@ export class SELECT extends ConstructedQuery { forShareLock (): this - forUpdate ({ wait }?: { wait?: number }): this + forUpdate({ wait, ignoreLocked }?: { wait?: number, ignoreLocked?: boolean }): this alias (as: string): this elements: EntityElements diff --git a/test/typescript/apis/project/cds-cqn.ts b/test/typescript/apis/project/cds-cqn.ts index 6f5b4d75..d776d7ae 100644 --- a/test/typescript/apis/project/cds-cqn.ts +++ b/test/typescript/apis/project/cds-cqn.ts @@ -27,6 +27,7 @@ res = sqn.SELECT.limit res = sqn.SELECT.mixin res = sqn.SELECT.forShareLock?.wait res = sqn.SELECT.forUpdate?.wait +res = sqn.SELECT.forUpdate?.ignoreLocked res = sqn.SELECT.search?.at(0) testType(sqn.SELECT.count) diff --git a/test/typescript/apis/project/cds-ql.ts b/test/typescript/apis/project/cds-ql.ts index 0d401ca3..6141a633 100644 --- a/test/typescript/apis/project/cds-ql.ts +++ b/test/typescript/apis/project/cds-ql.ts @@ -275,6 +275,7 @@ DELETE.from `${x}` .where `ID=${x}` SELECT.from(Foos).forUpdate() SELECT.from(Foos).forUpdate({wait: 5}) +SELECT.from(Foos).forUpdate({ignoreLocked: true}) SELECT.from(Foos).forShareLock() INSERT.into('Foos').values(1,2,3)