Commit Graph

5 Commits

Author SHA1 Message Date
oftenoccur c3b9b40ee8 chore: fix some typos in comments
Signed-off-by: oftenoccur <ezc5@sina.com>
2024-04-11 11:16:44 +08:00
tidwall cf7f49fd9b Add field path queries for json and comparison operators
It's now possible to query a JSON field using a GJSON path.

   SET fleet truck1 FIELD props '{"speed":58,"name":"Andy"}' POINT 33 -112

You can then use the GJSON type path to return the objects that match the WHERE.

   SCAN fleet WHERE props.speed 50 inf
   SCAN fleet WHERE props.name Andy Andy

Included in this commit is support for '==', '<', '>', '<=', '>=', and '!='.
The previous queries could be written like:

    SCAN fleet WHERE props.speed > 50
    SCAN fleet WHERE props.name == Andy
2022-10-20 11:17:01 -07:00
tidwall a824d58419 Minor optimization to avoid unneeded field merging 2022-09-22 14:22:45 -07:00
tidwall 2c643996e7 Immutable Object type 2022-09-20 14:20:53 -07:00
tidwall d5c148ca41 Field overhaul 2022-09-19 17:47:38 -07:00