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

Function generateColumns

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

Source from the content-addressed store, hash-verified

1763}
1764
1765const generateColumns = (
1766 keys: ReadonlyArray<string>,
1767 escape: (_: string, withoutTransform: boolean) => string,
1768 withoutTransform: boolean
1769) => {
1770 if (keys.length === 0) {
1771 return "()"
1772 }
1773
1774 let str = `(${escape(keys[0], withoutTransform)}`
1775 for (let i = 1; i < keys.length; i++) {
1776 str += `,${escape(keys[i], withoutTransform)}`
1777 }
1778 return str + ")"
1779}
1780
1781const extractPrimitive = (
1782 value: unknown,

Callers 1

compileFunction · 0.85

Calls 1

escapeFunction · 0.50

Tested by

no test coverage detected