restrict to use Query object from Joseki project
added support for closure tables (non Query), getParents, getChildren and getSubtree