MCPcopy Index your code
hub / github.com/zenstackhq/zenstack / execute

Method execute

packages/orm/src/client/client-impl.ts:282–291  ·  view source on GitHub ↗
(tx: AnyKysely)

Source from the content-addressed store, hash-verified

280 options?: { isolationLevel?: TransactionIsolationLevel },
281 ) {
282 const execute = async (tx: AnyKysely) => {
283 const txClient = new ClientImpl(this.schema, this.$options, this);
284 txClient.kysely = tx;
285 const result: any[] = [];
286 for (const promise of arg) {
287 const cb = this.getPromiseCallback(promise);
288 result.push(await cb(txClient as unknown as ClientContract<SchemaDef>));
289 }
290 return result;
291 };
292 if (this.kysely.isTransaction) {
293 // proceed directly if already in a transaction
294 return execute(this.kysely);

Callers 15

pull.test.tsFile · 0.80
introspectFunction · 0.80
sequentialTransactionMethod · 0.80
$connectMethod · 0.80
$executeRawMethod · 0.80
$queryRawMethod · 0.80
pushMethod · 0.80
handleManyToManyRelationFunction · 0.80
resetManyToManyRelationFunction · 0.80
createManyFunction · 0.80

Calls 3

getPromiseCallbackMethod · 0.95
cbFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected