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
Each MATCH is inclusive OR, thus
WITHIN fleet MATCH train* truck* BOUNDS 33 -112 34 -113
will find all trains and trucks that within the provides bounds.
This commit allows for buffering any GeoJSON object.
For example:
INTERSECTS fleet BUFFER 1000 OBJECT {...LineString...}
This will buffer add a 1 kilometer buffer to a linesting and
search the 'fleet' collection for all objects that
intersect the buffered linestring.
This commit also allows for performing INTERSECTS with a POINT
type. Thus allowing for a polygon-over-point operation, which is
an inverted point-in-polygon.
This commit cleans up various Go code in the internal directory.
- Ensures comments on exported functions
- Changes all *Server receiver in all files to be "s", instead
of mixed "c", "s", "server", etc.
- Silenced Go warnings for if/else with returns.
- Cleaned up import ordering.