Spatial containment — true if the first geometry contains the second.
v1 supports box-contains-point and box-contains-box:
Place
|> Ash.Query.filter(st_contains(bounds, ^test_point))
|> Ash.read!()
Place
|> Ash.Query.filter(st_contains(bounds, ^test_box))
|> Ash.read!()Both forms push down to Neo4j's native point.withinBBox:
box-contains-point as a single call, box-contains-box as two ANDed calls
on the inner box's SW and NE corners (which is sufficient for axis-aligned
boxes — the other two corners are implied). evaluate/1 covers the same
cases for in-memory fallback when pushdown isn't taken (e.g. expressions
the data layer can't recognise).
Named after the OGC / PostGIS convention (ST_Contains) for consistency
with ash_geo so consumer code reads the same across data layers.
Summary
Functions
Callback implementation for Ash.Query.Function.args/0.