feat: fallback to ctid for editing tables without primary key
When a table has no PRIMARY KEY, use PostgreSQL's ctid (physical row ID) to identify rows for UPDATE/DELETE operations instead of blocking edits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,6 +153,7 @@ export const updateRow = (params: {
|
||||
pkValues: unknown[];
|
||||
column: string;
|
||||
value: unknown;
|
||||
ctid?: string;
|
||||
}) => invoke<void>("update_row", params);
|
||||
|
||||
export const insertRow = (params: {
|
||||
@@ -169,6 +170,7 @@ export const deleteRows = (params: {
|
||||
table: string;
|
||||
pkColumns: string[];
|
||||
pkValuesList: unknown[][];
|
||||
ctids?: string[];
|
||||
}) => invoke<number>("delete_rows", params);
|
||||
|
||||
// History
|
||||
|
||||
Reference in New Issue
Block a user