used transaction for save table data

This commit is contained in:
Jan Prochazka
2023-02-05 19:17:46 +01:00
parent 722789ca01
commit e9a01a1ffd
6 changed files with 38 additions and 10 deletions

View File

@@ -12,6 +12,10 @@ export interface StreamOptions {
info?: (info) => void;
}
export interface RunScriptOptions {
useTransaction: boolean;
}
export interface QueryOptions {
discardResult?: boolean;
}
@@ -130,7 +134,7 @@ export interface EngineDriver {
createDatabase(pool: any, name: string): Promise;
dropDatabase(pool: any, name: string): Promise;
getQuerySplitterOptions(usage: 'stream' | 'script' | 'editor'): any;
script(pool: any, sql: string): Promise;
script(pool: any, sql: string, options?: RunScriptOptions): Promise;
getNewObjectTemplates(): NewObjectTemplate[];
// direct call of pool method, only some methods could be supported, on only some drivers
callMethod(pool, method, args);