I am working on Apache AGE, and I want all the child labels of a given Parent Label.
Example:
I have an edge named PARENT
, and GRANDCHILD
, CHILD
inherits this PARENT
. I want all the edges which inherit PARENT from the PostgreSQL table.
Given I have the OID of PARENT
edge Label available. I want to get all the OIDs of the child labels.
What I have done so FAR:
SELECT * FROM create_elabel('test', 'PARENT'); -- Created an edge Label named PARENT
SELECT * FROM create_elabel('test', 'CHILD', ARRAY['PARENT']); -- Created an edge Label named CHILD, Inherits PARENT
SELECT * FROM create_elabel('test', 'GRANDCHILD', ARRAY['PARENT']); -- Created an edge Label named GRANDCHILD, Inherits PARENT
Now In code I want the OIDs of CHILD
and GRANDCHILD
when I look for children of PARENT
.
Which PostgreSQL function would allow me to do that?