diff --git a/dal/Builder.ts b/dal/Builder.ts index 38eabca..0b30543 100644 --- a/dal/Builder.ts +++ b/dal/Builder.ts @@ -113,8 +113,8 @@ export default class Builder any> { this.methodCalls.set("Delete", []); return this; } - Insert(data: Record): Builder { - this.methodCalls.set("Insert", [data]); + Insert(...data: Record[]): Builder { + this.methodCalls.set("Insert", data); return this; } Set(data: Record): Builder { @@ -139,6 +139,10 @@ export default class Builder any> { this.methodCalls.set("DoNothing", []); return this; } + Tx(): Builder { + this.methodCalls.set("Tx", []); + return this; + } async *Rows>(): AsyncGenerator { this.formatRequest(); const response = await fetch(this.url, { diff --git a/dal/Protocol.ts b/dal/Protocol.ts index 81b39b8..069aef5 100644 --- a/dal/Protocol.ts +++ b/dal/Protocol.ts @@ -12,7 +12,7 @@ export interface Request { } export const METHODS = - "In|Find|Select|Fields|Join|Group|Sort|Limit|Offset|Delete|Insert|Set|Update|OnConflict|DoUpdate|DoNothing".split( + "In|Find|Select|Fields|Join|Group|Sort|Limit|Offset|Delete|Insert|Set|Update|OnConflict|DoUpdate|DoNothing|Tx".split( "|", );