MCPcopy Index your code
hub / github.com/simstudioai/sim / buildSelectChain

Function buildSelectChain

apps/sim/lib/billing/threshold-billing.test.ts:142–158  ·  view source on GitHub ↗
(rows: T[])

Source from the content-addressed store, hash-verified

140}
141
142function buildSelectChain<T>(rows: T[]) {
143 const chain = {
144 from: vi.fn(() => chain),
145 leftJoin: vi.fn(() => chain),
146 innerJoin: vi.fn(() => chain),
147 where: vi.fn(() => result),
148 }
149 const result = {
150 limit: vi.fn(async () => rows),
151 then: (resolve: (value: T[]) => unknown, reject?: (reason: unknown) => unknown) =>
152 Promise.resolve(rows).then(resolve, reject),
153 }
154
155 return {
156 from: chain.from,
157 }
158}
159
160function buildPersonalSelectChain(customerId = 'cus_1') {
161 return buildSelectChain([

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected