Updates
This commit is contained in:
@@ -1521,6 +1521,7 @@ export type DsqlCrudParam<
|
||||
table: string;
|
||||
data?: T;
|
||||
targetId?: string | number;
|
||||
targetField?: string;
|
||||
query?: DsqlCrudQueryObject<T>;
|
||||
sanitize?: (data?: T) => T;
|
||||
debug?: boolean;
|
||||
|
||||
@@ -13,6 +13,7 @@ export default async function dsqlCrud<
|
||||
query,
|
||||
sanitize,
|
||||
debug,
|
||||
targetField,
|
||||
}: DsqlCrudParam<T>): Promise<
|
||||
| (PostReturn & {
|
||||
queryObject?: ReturnType<Awaited<typeof sqlGenerator>>;
|
||||
@@ -56,7 +57,7 @@ export default async function dsqlCrud<
|
||||
query: {
|
||||
action: "update",
|
||||
table,
|
||||
identifierColumnName: "id",
|
||||
identifierColumnName: targetField || "id",
|
||||
identifierValue: String(finalId),
|
||||
data: finalData,
|
||||
},
|
||||
@@ -68,7 +69,7 @@ export default async function dsqlCrud<
|
||||
query: {
|
||||
action: "delete",
|
||||
table,
|
||||
identifierColumnName: "id",
|
||||
identifierColumnName: targetField || "id",
|
||||
identifierValue: String(finalId),
|
||||
},
|
||||
forceLocal: true,
|
||||
|
||||
Reference in New Issue
Block a user