jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Hartford" <dhartf...@ghsinc.com>
Subject RE: SQL example to replace basicsearch
Date Wed, 29 Nov 2006 14:18:41 GMT
Thank you David!
Would you happen to know what the namespace is for SQL through JCR-170?

I'm assuming I need to do something like this to use through webdav
search:

<!-- psuedocode, not real -->
<D:searchrequest xmlns:D=\"DAV:\" sql:=\"http://sqlnamespacehere">
<sql:select>select * from nt:base where F:ORIGINNUMBER='555-555-5555'
and jcr:path LIKE '/slide/files/%'</sql:select>
</D:searchrequest>



> -----Original Message-----
> From: David Nuescheler [mailto:david.nuescheler@gmail.com] 
> Sent: Wednesday, November 29, 2006 9:10 AM
> To: users@jackrabbit.apache.org
> Subject: Re: SQL example to replace basicsearch
> 
> hi darren,
> 
> if you were looking for the equivalent of...
> 
> > String queryssn = "<D:searchrequest xmlns:D=\"DAV:\">" + "  
> > <D:basicsearch xmlns:F=\"FAX\">" + "<D:select>" + "<D:allprop/>"
+ 
> > "</D:select>" + "<D:from>" +
> > "           <D:scope>" +
> > "              <D:href>/slide/files/</D:href>" +
> > "               <D:depth>infinity</D:depth>" +
> > "           </D:scope>" +
> > "       </D:from>" +
> > "       <D:where>" +
> > "           <D:eq>" +
> > "               <D:prop><F:ORIGINNUMBER/></D:prop>" +
> > "               <D:literal>555-555-5555</D:literal>" +
> > "           </D:eq>" +
> > "       </D:where>" +
> > "   </D:basicsearch>" +
> > "</D:searchrequest>";
> 
> ...in sql on jcr I guess...
> 
> select * from nt:base where F:ORIGINNUMBER='555-555-5555' and 
> jcr:path LIKE '/slide/files/%'
> 
> ...would do the trick.
> 
> regards,
> david
> 

Mime
View raw message