MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / executeBatch

Method executeBatch

services/db-proxy/src/app-db-do.ts:126–137  ·  view source on GitHub ↗

* Execute a batch of queries in a transaction * Used by Drizzle's migration runner for atomic schema changes

(
    queries: Array<{ sql: string; params: unknown[]; method: QueryMethod }>
  )

Source from the content-addressed store, hash-verified

124 * Used by Drizzle's migration runner for atomic schema changes
125 */
126 executeBatch(
127 queries: Array<{ sql: string; params: unknown[]; method: QueryMethod }>
128 ): Array<QuerySuccessResponse> {
129 return this.ctx.storage.transactionSync(() => {
130 const results: Array<QuerySuccessResponse> = [];
131 for (const query of queries) {
132 const result = this.executeQuery(query.sql, query.params, query.method);
133 results.push(result);
134 }
135 return results;
136 });
137 }
138
139 /**
140 * Internal tables excluded from schema exports:

Callers 1

runtime.tsFile · 0.80

Calls 3

executeQueryMethod · 0.95
pushMethod · 0.80
transactionSyncMethod · 0.65

Tested by

no test coverage detected