This commit is contained in:
Benjamin Toby
2025-07-05 18:17:35 +01:00
parent fcc668d3a1
commit 3597b11342
8 changed files with 32 additions and 19 deletions
@@ -13,6 +13,7 @@ type Param<T extends {
identifierColumnName: keyof T;
identifierValue: string | number;
forceLocal?: boolean;
debug?: boolean;
};
/**
* # Update DB Function
@@ -20,5 +21,5 @@ type Param<T extends {
*/
export default function updateDbEntry<T extends {
[k: string]: any;
} = any>({ dbContext, dbFullName, tableName, data, tableSchema, identifierColumnName, identifierValue, encryptionKey, encryptionSalt, forceLocal, }: Param<T>): Promise<APIResponseObject<PostInsertReturn>>;
} = any>({ dbContext, dbFullName, tableName, data, tableSchema, identifierColumnName, identifierValue, encryptionKey, encryptionSalt, forceLocal, debug, }: Param<T>): Promise<APIResponseObject<PostInsertReturn>>;
export {};
+2 -1
View File
@@ -25,7 +25,7 @@ const purge_default_fields_1 = __importDefault(require("../../../utils/purge-def
* @description
*/
function updateDbEntry(_a) {
return __awaiter(this, arguments, void 0, function* ({ dbContext, dbFullName, tableName, data, tableSchema, identifierColumnName, identifierValue, encryptionKey, encryptionSalt, forceLocal, }) {
return __awaiter(this, arguments, void 0, function* ({ dbContext, dbFullName, tableName, data, tableSchema, identifierColumnName, identifierValue, encryptionKey, encryptionSalt, forceLocal, debug, }) {
var _b;
/**
* Check if data is valid
@@ -139,6 +139,7 @@ function updateDbEntry(_a) {
sql: query,
params: updateValues,
},
debug: debug ? { data, newData } : undefined,
};
});
}