Is there a mechanism for determining directly the number of subnodes under a given global node? I know it is possible to $order through the subnodes and generate a count, but I'm interested in being able to know the count of any global node without having to loop over the node. I suspect the database itself knows these counts, but is there a user-level command or function that can access this?
Thanks!
Dennis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is no mechanism to directly determine the number of subnodes under a given global. You have to do a $ORDER or $QUERY as appropriate. The database does not maintain these counts either.
Thanks,
Narayanan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One more thing I forgot to mention in my response. MUPIP INTEG can report the information at a global level but it gets this information by traversing the database as well so it will take some time. This is just in case you want to use an existing tool.
Thanks,
Narayanan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a mechanism for determining directly the number of subnodes under a given global node? I know it is possible to $order through the subnodes and generate a count, but I'm interested in being able to know the count of any global node without having to loop over the node. I suspect the database itself knows these counts, but is there a user-level command or function that can access this?
Thanks!
Dennis
Dennis,
There is no mechanism to directly determine the number of subnodes under a given global. You have to do a $ORDER or $QUERY as appropriate. The database does not maintain these counts either.
Thanks,
Narayanan.
Dennis,
One more thing I forgot to mention in my response. MUPIP INTEG can report the information at a global level but it gets this information by traversing the database as well so it will take some time. This is just in case you want to use an existing tool.
Thanks,
Narayanan.