-
Notifications
You must be signed in to change notification settings - Fork 2.8k
add PostGIS operators in boolean expressions (close #1051) #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TODO:- Add Tests
|
Review app for commit 95fb110 deployed to Heroku: https://hge-ci-pull-1372.herokuapp.com |
| - PostGIS equivalent | ||
| * - ``_st_contains`` | ||
| - ``ST_Contains`` | ||
| * - ``_st_contains_in`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_st_contains_in to _st_contained_in.
| stDWithinOpInpVal = | ||
| InpValInfo (Just stDWithinDesc) "_st_d_within" $ G.toGT stDWithinInpTy | ||
| stDWithinDesc = | ||
| "is the column within in the given distance from given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the column within a distance from a geometry value
| geomOps = | ||
| [ | ||
| ( "_st_contains" | ||
| , "does the column contain given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"does the column contain the given geometry value"
| ) | ||
| , | ||
| ( "_st_contains_in" | ||
| , "is the column contained in given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the*
| , "is the column contained in given geometry value" | ||
| ) | ||
| , ( "_st_crosses" | ||
| , "does the column crosses given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the given
| , "does the column crosses given geometry value" | ||
| ) | ||
| , ( "_st_disjoint" | ||
| , "does the column don't spatially intersect the given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the opposite of _st_intersects, it is often more efficient to use _not: {_st_intersects: value} over this operator"
| , ( "_st_touches" | ||
| , "does the column have atleast one point in common with given geometry value" | ||
| ) | ||
| , ( "_st_within" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as _contained_in?
| , "does the column spatially intersect the given geometry value" | ||
| ) | ||
| , ( "_st_overlaps" | ||
| , "does the column overlaps given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"does the column 'spatially overlap' (intersect but not completely contain) the given geometry value"
server/src-lib/Hasura/SQL/DML.hs
Outdated
| | BENotNull !SQLExp | ||
| | BEExists !Select | ||
| | BEIN !SQLExp ![SQLExp] | ||
| | BEFunc !T.Text ![SQLExp] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not have BEExp !SQLExp so that any SQLExp of type boolean can be used? Avoids having to define SEFnApp like constructor for BoolExp
| , "does the column have atleast one point in common with the given geometry value" | ||
| ) | ||
| , ( "_st_within" | ||
| , "does the column completely inside given geometry value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is the column contained in the given geometry value"
|
Review app for commit c6e755f deployed to Heroku: https://hge-ci-pull-1372.herokuapp.com |
|
Review app https://hge-ci-pull-1372.herokuapp.com is deleted |
### What This PR makes the docker-compose.yaml useful for both running the engine in docker as well as when the engine is running locally on the host. This enables a new `just start-engine` target that runs the engine locally while using the same deps and configuration as in docker-compose.yaml. Running engine this way is faster than constantly rebuilding in Docker. ### How The various component in docker-compose.yaml are configured to talk to one another via `local.hasura.dev` in the same way as Hasura projects are done via `ddn`. This enables the engine to not care whether it is running on the host machine directly via cargo or inside a docker container. The Dockerfile has also been simplified a little and now only builds the engine, not every single crate. V3_GIT_ORIGIN_REV_ID: b17b066fc204fd76b74633990b9862f5db4f180a
Description
What component does this PR affect?
Requires changes from other components? If yes, please mark the components:
Related Issue
close #1051
Solution and Design
Support postgis functions (which returns bool) in boolean expressions mentioned here
Type
Checklist: