MCPcopy Create free account
hub / github.com/Effect-TS/effect / makePlaceholdersArray

Function makePlaceholdersArray

packages/effect/src/unstable/sql/Statement.ts:1447–1458  ·  view source on GitHub ↗
(evaluate: (u: unknown) => string)

Source from the content-addressed store, hash-verified

1445}
1446
1447const makePlaceholdersArray = (evaluate: (u: unknown) => string) => (values: ReadonlyArray<unknown>): string => {
1448 if (values.length === 0) {
1449 return ""
1450 }
1451
1452 let result = evaluate(values[0])
1453 for (let i = 1; i < values.length; i++) {
1454 result += `,${evaluate(values[i])}`
1455 }
1456
1457 return result
1458}
1459
1460const generateColumns = (
1461 keys: ReadonlyArray<string>,

Callers 1

compileFunction · 0.85

Calls 1

evaluateFunction · 0.70

Tested by

no test coverage detected