-
Notifications
You must be signed in to change notification settings - Fork 0
SQL Find References
SQL command to search all records that contains a link to a given record id in the entire database or a subset of specified class and cluster. Returns a set of record ids.
{{{FIND REFERENCES <rid|()> [- rid as the record id to search. If a sub-query is passed, then all the RIDs returned by the sub-query will be searched. Sub-query is available since 1.0rc9
- class-list list of specific class or cluster, separated by commas, you want to execute the search in.
Returns a list of document containing 2 fields:
- rid, as the original RID searched
- referredBy, as a Set of RIDs containing the collection of RID that reference the searched rid if any, otherwise the set is empty
Get all the records that contains a link to 5:0
find references 5:0
Result example:
e11b22bc97654bd9250605e6299ef075
Get all the references to the record of the default cluster (available since 1.0rc9):
86b4966dd760d0cb7d13ba2684ded8e5
Get all the records in Profile and !AnimalType classes that contains a link to 5:0 :
9119a50321865bacafbfedc34531a81a
Get all the records in Profile cluster and !AnimalType class that contains a link to 5:0
find references 5:0 [cluster:Profile,AnimalType]
To know more about other SQL commands look at SQL SQL commands.