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

Function in_

packages/effect/src/sql/Statement.ts:1810–1821  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1808function in_(values: ReadonlyArray<unknown>): ArrayHelper
1809function in_(column: string, values: ReadonlyArray<unknown>): Fragment
1810function in_(): Fragment | ArrayHelper {
1811 if (arguments.length === 1) {
1812 return arrayHelper(arguments[0])
1813 }
1814 const column = arguments[0]
1815 const values = arguments[1]
1816 return values.length === 0 ? neverFragment : fragment([
1817 identifier(column),
1818 literal(" IN "),
1819 arrayHelper(values)
1820 ])
1821}
1822
1823const neverFragment = fragment([literal("1=0")])
1824

Callers

nothing calls this directly

Calls 4

arrayHelperFunction · 0.85
fragmentFunction · 0.85
identifierFunction · 0.70
literalFunction · 0.70

Tested by

no test coverage detected