RedisGraph / redisgraph-go

A Golang client for redisgraph
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
132 stars 38 forks source link

What is the purpose of alias on a node? #71

Closed mg98 closed 2 years ago

mg98 commented 2 years ago

Glimpsing on the code, I would assume it serves the purpose of a kind of primary/unique key or ID on a node -- which is what I am looking for desperately! But this does not seem to be the case and according to my research, it's also not something that RG natively would support.

swilly22 commented 2 years ago

An alias only exists within the context of a query, within it the alias is uniqued at any given scope, aliases are used to reference entities. As you've mentioned aliases aren't committed into the graph, once an entity has been committed it is assigned a unique entity ID which is generated by the database. RG supports aliases natively as they're defined by the query language

mg98 commented 2 years ago

Ahh I see. Thank you very much for clarifying @swilly22 .