MCPcopy
hub / github.com/drizzle-team/drizzle-orm / notInArray

Function notInArray

drizzle-orm/src/sql/expressions/conditions.ts:322–334  ·  view source on GitHub ↗
(
	column: SQLWrapper,
	values: (unknown | Placeholder)[] | SQLWrapper,
)

Source from the content-addressed store, hash-verified

320 values: (unknown | Placeholder)[] | SQLWrapper,
321): SQL;
322export function notInArray(
323 column: SQLWrapper,
324 values: (unknown | Placeholder)[] | SQLWrapper,
325): SQL {
326 if (Array.isArray(values)) {
327 if (values.length === 0) {
328 return sql`true`;
329 }
330 return sql`${column} not in ${values.map((v) => bindIfParam(v, column))}`;
331 }
332
333 return sql`${column} not in ${bindIfParam(values, column)}`;
334}
335
336/**
337 * Test whether an expression is NULL. By the SQL standard,

Callers 13

testsFunction · 0.90
testsFunction · 0.90
awsdatapi.test.tsFile · 0.90
testsFunction · 0.90
gel.test.tsFile · 0.90
bun-sql.test.tsFile · 0.90
testsFunction · 0.90
select.tsFile · 0.90
select.tsFile · 0.90
select.tsFile · 0.90
select.tsFile · 0.90

Calls 2

sqlFunction · 0.90
bindIfParamFunction · 0.85

Tested by

no test coverage detected