Replies: 1 comment
-
Kind of related to a POC I was experimenting with https://github.com/jberzy/age/tree/computed-graph. The POC is a little more generic as it lets you register an existing postgres view as a vertex/edge table. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got a graph-like dataset where I also need to be able to perform geographical queries (e.g. "which node is closest to lat/lng?"). My idea was therefore to have both a vertex with a
Location
label as well as alocations
table. Each row in thelocations
table would map to aLocation
vertex, preferably with anON DELETE CASCADE
foreign key.This would allow me to create a geographical index on the
locations
table using postgis. It would also allow me to add other properties, provide fuzzy search viapg_trgm
and add other indexes specific to my needs. Finally, this setup would provide me with type safety and consistency guarantees.Using this setup, I would like to be able to write cypher queries that automatically join in my
locations
values when needed:Unfortunately, I cannot find a way to do this in Apache AGE at the moment. I understand that I could use regular SQL joins on the dataset returned by
cypher(...)
but this seems inefficient and perhaps even insufficient for more complicated queries.So to summarize: does AGE support
ON DELETE CASCADE
referencing to the vertex/edge detailed by each row in this table?If not, what are your thoughts on this as a feature in general? Yay/nay?
Beta Was this translation helpful? Give feedback.
All reactions