25 lines
817 B
TypeScript
25 lines
817 B
TypeScript
import { DbContextsArray } from "./runQuery";
|
|
import { PostInsertReturn } from "../../../types";
|
|
type Param<T extends {
|
|
[k: string]: any;
|
|
} = any> = {
|
|
dbContext?: (typeof DbContextsArray)[number];
|
|
dbFullName?: string;
|
|
tableName: string;
|
|
encryptionKey?: string;
|
|
encryptionSalt?: string;
|
|
data: any;
|
|
tableSchema?: import("../../../types").DSQL_TableSchemaType;
|
|
identifierColumnName: keyof T;
|
|
identifierValue: string | number;
|
|
forceLocal?: boolean;
|
|
};
|
|
/**
|
|
* # Update DB Function
|
|
* @description
|
|
*/
|
|
export default function updateDbEntry<T extends {
|
|
[k: string]: any;
|
|
} = any>({ dbContext, dbFullName, tableName, data, tableSchema, identifierColumnName, identifierValue, encryptionKey, encryptionSalt, forceLocal, }: Param<T>): Promise<PostInsertReturn | null>;
|
|
export {};
|