You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by KÖLL Claus <C....@TIROL.GV.AT> on 2007/03/21 09:06:28 UTC

AW: Support for NOT LIKE in queries ?

I have found this mail and i have the same issue.
The behaviour is exactly what greg wrote.

Are there plans to support it?
 
thanks
claus

-----Ursprüngliche Nachricht-----
Von: gjoseph [mailto:mwinmwin@gmail.com] 
Gesendet: Donnerstag, 01. Februar 2007 21:15
An: users@jackrabbit.apache.org
Betreff: Support for NOT LIKE in queries ?


Hi list,

I may be missing something obvious here, but even though the spec doesn't
explicitely mention support for NOT LIKE statements, I was assuming it to be
supported. However, doing a query like
select * from foo:bar where jcr:path not like '/baz/'
returns exactly the same results as
select * from foo:bar where jcr:path like '/baz/'
.. hence the "not" keyword being apparently completely ignored.

Am I missing the obvious? Is this really not supported and/or specified? Is
there an alternative way to get the desired results? (be in sql or xpath..)

Thanks in advance ! 

greg
-- 
View this message in context: http://www.nabble.com/Support-for-NOT-LIKE-in-queries---tf3157132.html#a8755525
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: AW: Support for NOT LIKE in queries ?

Posted by Marcel Reutegger <ma...@gmx.net>.
KÖLL Claus wrote:
> I have found this mail and i have the same issue.
> The behaviour is exactly what greg wrote.
> 
> Are there plans to support it?

I am not in favor of supporting this, because it cannot be translated into an 
equivalent XPath query. but I think there's an enhancement coming along in jsr 
283, which will allow you to specify a query that achieves the same:

/jcr:root/*[jcr:name() != 'baz']//element(*, foo:bar)

jcr:name() returns the name of the node as returned by Node.getName().

regards
  marcel