fix(oracle): support locked edits and OceanBase sources

This commit is contained in:
t8y2 committed 2026-07-23 23:59:03 +08:00
1 parent 3b004abb1e
commit 2bdab48d78
8 files changed
+394 -5

No files matched your search

@@ -64,6 +64,18 @@ describe("editable query hidden primary keys", () => {
});
});
it("preserves an Oracle FOR UPDATE clause when appending a hidden row key", () => {
expect(
buildQueryWithHiddenPrimaryKeys({
sql: "SELECT * FROM APP.USERS FOR UPDATE SKIP LOCKED",
databaseType: "oracle",
primaryKeys: ["__DBX_ROWID"],
existingResultNames: ["ID", "NAME"],
sourceExpressions: { __DBX_ROWID: "ROWIDTOCHAR(ROWID)" },
})?.sql,
).toBe('SELECT USERS.*, ROWIDTOCHAR(ROWID) AS "__DBX_PK_0" FROM APP.USERS FOR UPDATE SKIP LOCKED');
});
it("qualifies a bare Oracle wildcard when appending a hidden key", () => {
expect(
buildQueryWithHiddenPrimaryKeys({