json-fs-query 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -148,6 +148,14 @@ read workouts where reps > 8 and where date = '2024-06-02'
148
148
  `or where` is not supported yet, and is an error (in 1.x it was silently read as `and where`). And/or with grouping
149
149
  and precedence is planned.
150
150
 
151
+ ### Comparing by the field's type
152
+
153
+ Conditions compare by the field's declared type, whatever type the stored value or the literal has: in a `string`
154
+ or `int` field, `'3'` and `3` are equal. Ordering (`>`, `>=`, `<`, `<=`, `between`) and `sort` follow it too: a
155
+ `string` field orders as text, so `'10'` comes before `'9'` (even ids stored as numbers), and an `int` field as
156
+ numbers. A field with no declared type, or an `object` or `array` one, compares the stored values as they are.
157
+ `like` only matches values stored as text.
158
+
151
159
  ### Null and missing fields
152
160
 
153
161
  A field can be missing (left out) or hold `null`, and both are their own cases, as in SQL: they match no