You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Lorenzo Dini <Lo...@cern.ch> on 2007/09/27 14:08:17 UTC

String property to Long

Is there any way to convert a string property as a long when specyfing a 
filter in a XPATH Query??

Something like

/jcr:root/test:nodes[xs:long(@test:property) >= 45]

Thanks you very much.

Lorenzo

-- 
*Lorenzo Dini*

CERN - European Organization for Nuclear Research
Information Technology Department
CH-1211 Geneva 23

Building 28 - Office 1-007
Phone: +41 (0) 22 7674384
Fax: +41 (0) 22 7668847
E-mail: Lorenzo.Dini@cern.ch

Re: String property to Long

Posted by Lorenzo Dini <Lo...@cern.ch>.
Hi,

Thank you for your answer...
I imagined it was too complex... I tried :-P

Right now the property can be whatever cause it is where we store the result
of a plugins created by users...

I think I wil go for a set of properties with different type like
NumericalProperty
StringProperty
DateProperty

Etc...

Thank you very much again!

Lorenzo


On 28/9/07 17:58, "Marcel Reutegger" <ma...@gmx.net> wrote:

> Lorenzo Dini wrote:
>> Is there any way to convert a string property as a long when specyfing a
>> filter in a XPATH Query??
>> 
>> Something like
>> 
>> /jcr:root/test:nodes[xs:long(@test:property) >= 45]
> 
> no, this is not supported, because it requires a complete scan over all
> @test:property values. did you consider migrating the property to a long type?
> 
> regards
>   marcel

--
 
Lorenzo Dini

CERN ­ European Organization for Nuclear Research
Information Technology Department
CH-1211 Geneva 23  

Building 28 - Office 1-007
Phone: +41 (0) 22 7674384
Fax: +41 (0) 22 7668847
E-mail: Lorenzo.Dini@cern.ch



Re: String property to Long

Posted by Marcel Reutegger <ma...@gmx.net>.
Lorenzo Dini wrote:
> Is there any way to convert a string property as a long when specyfing a 
> filter in a XPATH Query??
> 
> Something like
> 
> /jcr:root/test:nodes[xs:long(@test:property) >= 45]

no, this is not supported, because it requires a complete scan over all 
@test:property values. did you consider migrating the property to a long type?

regards
  marcel