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

Function generateColumns

packages/effect/src/unstable/sql/Statement.ts:1460–1474  ·  view source on GitHub ↗
(
  keys: ReadonlyArray<string>,
  escape: (_: string, withoutTransform: boolean) => string,
  withoutTransform: boolean
)

Source from the content-addressed store, hash-verified

1458}
1459
1460const generateColumns = (
1461 keys: ReadonlyArray<string>,
1462 escape: (_: string, withoutTransform: boolean) => string,
1463 withoutTransform: boolean
1464) => {
1465 if (keys.length === 0) {
1466 return "()"
1467 }
1468
1469 let str = `(${escape(keys[0], withoutTransform)}`
1470 for (let i = 1; i < keys.length; i++) {
1471 str += `,${escape(keys[i], withoutTransform)}`
1472 }
1473 return str + ")"
1474}
1475
1476const extractPrimitive = (
1477 value: unknown,

Callers 1

compileFunction · 0.85

Calls 1

escapeFunction · 0.50

Tested by

no test coverage detected