MCPcopy
hub / github.com/simstudioai/sim / begin

Function begin

packages/db/tx-tripwire.test.ts:37–46  ·  view source on GitHub ↗
(...args: unknown[])

Source from the content-addressed store, hash-verified

35 // client's unsafe (the instrumented one) before running the callback on
36 // a reserved connection.
37 begin(...args: unknown[]) {
38 const callback = args[args.length - 1] as (reserved: FakeReserved) => unknown
39 const reserved: FakeReserved = {
40 unsafe: (query: string) => {
41 reservedQueries.push(query)
42 return Promise.resolve([])
43 },
44 }
45 return Promise.resolve(this.unsafe('begin')).then(() => callback(reserved))
46 },
47 },
48 'test-pool'
49 )

Callers

nothing calls this directly

Calls 3

resolveMethod · 0.65
unsafeMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected