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

Function valuesEqual

packages/db/src/query/compiler/evaluators.ts:27–32  ·  view source on GitHub ↗

* Equality that follows PostgreSQL float semantics for `NaN`/invalid Dates: * such values are equal to one another and unequal to anything else. For all * other values it defers to areValuesEqual. Operands must not be * null/undefined (callers handle UNKNOWN first).

(a: any, b: any)

Source from the content-addressed store, hash-verified

25 * null/undefined (callers handle UNKNOWN first).
26 */
27function valuesEqual(a: any, b: any): boolean {
28 if (isUnorderable(a) || isUnorderable(b)) {
29 return isUnorderable(a) && isUnorderable(b)
30 }
31 return areValuesEqual(a, b)
32}
33
34function toDateValue(value: any): Date | null {
35 if (value instanceof Date) {

Callers 1

compileFunctionFunction · 0.85

Calls 2

isUnorderableFunction · 0.85
areValuesEqualFunction · 0.50

Tested by

no test coverage detected