[Mulgara-general] how to order walk solutions

Greg Jansen count0 at email.unc.edu
Fri Nov 21 14:52:01 UTC 2008


Below I have pasted two queries and their output, note the difference in 
solution order.  The graph is a simple hierarchy of "contains" 
predicates.  I'd like to get the solutions back in the same order they 
are walked.  Is that order lost when you remove walk variables?  Is it 
sufficient to include just one variable from the walk?
Any recommendations are much appreciated.

thanks,
Greg

TQL> select $child from <rmi://127.0.0.1/server1#ri>
where walk(
  $p <http://cdr.unc.edu/definitions/1.0/base-model.xml#contains> 
<info:fedora/changeme:2556>
  and $p <http://cdr.unc.edu/definitions/1.0/base-model.xml#contains> $c)
and $c <http://cdr.unc.edu/definitions/1.0/base-model.xml#slug> $child;
[ "mencius" ]
[ "confucians" ]
[ "writings" ]
3 rows returned.

TQL> select $child $c from <rmi://127.0.0.1/server1#ri>
where walk(
  $p <http://cdr.unc.edu/definitions/1.0/base-model.xml#contains> 
<info:fedora/changeme:2556>
  and $p <http://cdr.unc.edu/definitions/1.0/base-model.xml#contains> $c)
and $c <http://cdr.unc.edu/definitions/1.0/base-model.xml#slug> $child;
[ "confucians", info:fedora/changeme:2554 ]
[ "mencius", info:fedora/changeme:2555 ]
[ "writings", info:fedora/changeme:2556 ]
3 rows returned.


__
Greg Jansen
Carolina Digital Repository
University of North Carolina at Chapel Hill



More information about the Mulgara-general mailing list