Add default returning record on db insert and update
This commit is contained in:
Vendored
+6
-1
@@ -7,11 +7,16 @@ type Params<Schema extends {
|
||||
table: Table;
|
||||
data: Schema[];
|
||||
update_on_duplicate?: boolean;
|
||||
/**
|
||||
* Append `RETURNING *` so the inserted record(s) come back in
|
||||
* `payload`/`singleRes`. Defaults to `true`.
|
||||
*/
|
||||
returning?: boolean;
|
||||
config?: BunSQLiteConfig;
|
||||
};
|
||||
export default function DbInsert<Schema extends {
|
||||
[k: string]: any;
|
||||
} = {
|
||||
[k: string]: any;
|
||||
}, Table extends string = string>({ table, data, update_on_duplicate, config, }: Params<Schema, Table>): Promise<APIResponseObject>;
|
||||
}, Table extends string = string>({ table, data, update_on_duplicate, returning, config, }: Params<Schema, Table>): Promise<APIResponseObject<Schema>>;
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user