Skip to main content

Module compare

Module compare 

Source
Expand description

Comparing row values (packages/zql/src/ivm/data.ts).

Structs§

IncomparableError
Two values JS’s compareValues throws on.

Functions§

compare
compare_checked, with a total order for the inputs JS throws on: by type, then by JSON encoding. Pipelines use this so a bad orderBy (on a json column) degrades instead of failing.
compare_checked
compareValues(a, b): strings by UTF-8 bytes, numbers numerically, false < true, and null before everything. Values of different non-null types, and arrays or objects, can’t be compared: JS throws.
equal
valuesEqual(a, b): like ===, except null equals nothing (as in SQL joins). Arrays and objects are never equal: JS compares them by reference.