19 lines
585 B
TypeScript
19 lines
585 B
TypeScript
import type { BunMariaDBConfig, DBResponseObject, ServerQueryParam } from "../../types";
|
|
type Params<Schema extends {
|
|
[k: string]: any;
|
|
} = {
|
|
[k: string]: any;
|
|
}, Table extends string = string> = {
|
|
table: Table;
|
|
data: Schema;
|
|
query?: ServerQueryParam<Schema>;
|
|
targetId?: number | string;
|
|
config?: BunMariaDBConfig;
|
|
};
|
|
export default function DbUpdate<Schema extends {
|
|
[k: string]: any;
|
|
} = {
|
|
[k: string]: any;
|
|
}, Table extends string = string>({ table, data, query, targetId, config, }: Params<Schema, Table>): Promise<DBResponseObject>;
|
|
export {};
|