MCPcopy Create free account
hub / github.com/TanStack/db / isComparisonOp

Function isComparisonOp

packages/electric-db-collection/src/sql-compiler.ts:390–393  ·  view source on GitHub ↗

* Check if operator is a comparison operator that takes two values * These operators cannot accept null/undefined as values * (null comparisons in SQL always evaluate to UNKNOWN)

(name: string)

Source from the content-addressed store, hash-verified

388 * (null comparisons in SQL always evaluate to UNKNOWN)
389 */
390function isComparisonOp(name: string): boolean {
391 const comparisonOps = [`eq`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`]
392 return comparisonOps.includes(name)
393}
394
395/**
396 * Checks if the operator is a comparison operator (excluding eq)

Callers 1

compileFunctionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected