Which one is best to query the jcr ? Is SQL or JCRSQL2 or JQOM ? | Adobe Higher Education
Skip to main content
October 16, 2015
解決済み

Which one is best to query the jcr ? Is SQL or JCRSQL2 or JQOM ?

  • October 16, 2015
  • 3 の返信
  • 1973 ビュー

Hi,

 

SQL - select * from nt:base where cq:lastModified > TIMESTAMP  '2014-04-08T23:59:59.000+05:30'
 is works fine .But for JCR-SQL2 what will be the query I tried this

SELECT * FROM [nt:base] AS s WHERE cq:lastModified > TIMESTAMP  '2014-04-08T23:59:59.000+05:30'

But no luck.

Thanks in advance

このトピックへの返信は締め切られました。
ベストアンサー Ove_Lindström

SQL is the one that most developers knows and is most likely to get correct. But, some things are not doable.

JCR-SQL2 has a lot of power an the ability to do whatever you want in the JCR tree.

JQOM is just a Java representation of the JCR-SQL2 and eventually boils down to a SQL2 query. I actually like this one, since I don't have mess around with a lot or String concatenation.

Just my $0.02.

 

/Ove

3 の返信

October 16, 2015

You can try this one for SQL2. Worked for me:

SELECT s.*
FROM [nt:base] AS s
WHERE s.[cq:lastModified] >= CAST('2014-04-08T23:59:59.000+05:30' AS DATE)

Many Thanks and Best Regards,

Neha Sinha

October 16, 2015

Yes i tried that it worked.

But which query language is recommended to do ?

Thanks

Level 6
October 16, 2015

SQL is the one that most developers knows and is most likely to get correct. But, some things are not doable.

JCR-SQL2 has a lot of power an the ability to do whatever you want in the JCR tree.

JQOM is just a Java representation of the JCR-SQL2 and eventually boils down to a SQL2 query. I actually like this one, since I don't have mess around with a lot or String concatenation.

Just my $0.02.

 

/Ove