[xwiki-devs] [Proposal] Why don't we use XWQL and the Query Manager + ScriptService
Hi devs, I'm wondering why we haven't moved to using XQL instead of HQL. Any reason? If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it. Additionally I'd like to propose that we move to a ScriptService to access the query manager. From Velocity you'd write the following to get a Query: $services.query.xwql("....") Note that the ScriptService implementation would replace the SecureQueryManager implementation. We would also deprecate XWiki.getQueryManager. WDYT? Thanks -Vincent
Is it secure? The searchDocuments function has the benefit of having had a lot of security review. Vincent Massol wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Jun 11, 2010, at 9:53 AM, Caleb James DeLisle wrote:
Is it secure?
I don't feel that's a good enough reason not to use it since it would mean that we would never use any new API. If we want to use it, we can review it from a security POV. That said, it looks secure, see http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-query/manager/s...
The searchDocuments function has the benefit of having had a lot of security review.
Well the Query Manager has had the benefit of being written after searchDocument, thus inheriting from best practices. Thanks -Vincent
Vincent Massol wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
Thanks -Vincent
On Fri, Jun 11, 2010 at 09:03, Vincent Massol <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
I think the major issue is that nobody knows it very well and without Artem to push on it and help we just forgot about it. Also I think Artem was waiting JCR2 that was not release when he started working on it to finish XQL implementation that was too limited by JCR1. But yes we should really use XQL if possible.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Jun 11, 2010, at 11:13 AM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 09:03, Vincent Massol <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
I think the major issue is that nobody knows it very well and without Artem to push on it and help we just forgot about it.
Also I think Artem was waiting JCR2 that was not release when he started working on it to finish XQL implementation that was too limited by JCR1.
XWQL is not tied to JCR (the execution engine is Hibernate right now). It's tied to JPQA but only at the grammar level (we have our grammer and our parser). Why do you think it's not finished? from what I've seen it looks finished and it worked well when I used it. I only saw a potential grammar issue that you are forces to use "as" for a query to be valid. For example: "from doc.object(XWiki.XWikiUsers) as user" (using "from doc.object(XWiki.XWikiUsers)" will not work) Thanks -Vincent
But yes we should really use XQL if possible.
Thanks -Vincent
On Fri, Jun 11, 2010 at 11:29, Vincent Massol <[email protected]> wrote:
On Jun 11, 2010, at 11:13 AM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 09:03, Vincent Massol <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
I think the major issue is that nobody knows it very well and without Artem to push on it and help we just forgot about it.
Also I think Artem was waiting JCR2 that was not release when he started working on it to finish XQL implementation that was too limited by JCR1.
XWQL is not tied to JCR (the execution engine is Hibernate right now). It's tied to JPQA but only at the grammar level (we have our grammer and our parser).
I talked about XQL not the query manager. I tough JPQL was part of JCR.
Why do you think it's not finished? from what I've seen it looks finished and it worked well when I used it.
I said "i think".
I only saw a potential grammar issue that you are forces to use "as" for a query to be valid. For example: "from doc.object(XWiki.XWikiUsers) as user"
(using "from doc.object(XWiki.XWikiUsers)" will not work)
Thanks -Vincent
But yes we should really use XQL if possible.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Fri, Jun 11, 2010 at 12:13, Thomas Mortagne <[email protected]> wrote:
On Fri, Jun 11, 2010 at 11:29, Vincent Massol <[email protected]> wrote:
On Jun 11, 2010, at 11:13 AM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 09:03, Vincent Massol <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
I think the major issue is that nobody knows it very well and without Artem to push on it and help we just forgot about it.
Also I think Artem was waiting JCR2 that was not release when he started working on it to finish XQL implementation that was too limited by JCR1.
XWQL is not tied to JCR (the execution engine is Hibernate right now). It's tied to JPQA but only at the grammar level (we have our grammer and our parser).
I talked about XQL not the query manager. I tough JPQL was part of JCR.
Why do you think it's not finished? from what I've seen it looks finished and it worked well when I used it.
I said "i think".
I only saw a potential grammar issue that you are forces to use "as" for a query to be valid. For example: "from doc.object(XWiki.XWikiUsers) as user"
(using "from doc.object(XWiki.XWikiUsers)" will not work)
Anyway my main point is that if we start to use it a lot it makes it critical and we need somebody to take care of that since we will find bugs for sure.
Thanks -Vincent
But yes we should really use XQL if possible.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne
On Jun 11, 2010, at 12:17 PM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 12:13, Thomas Mortagne <[email protected]> wrote:
On Fri, Jun 11, 2010 at 11:29, Vincent Massol <[email protected]> wrote:
On Jun 11, 2010, at 11:13 AM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 09:03, Vincent Massol <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
I think the major issue is that nobody knows it very well and without Artem to push on it and help we just forgot about it.
Also I think Artem was waiting JCR2 that was not release when he started working on it to finish XQL implementation that was too limited by JCR1.
XWQL is not tied to JCR (the execution engine is Hibernate right now). It's tied to JPQA but only at the grammar level (we have our grammer and our parser).
I talked about XQL not the query manager. I tough JPQL was part of JCR.
Why do you think it's not finished? from what I've seen it looks finished and it worked well when I used it.
I said "i think".
I only saw a potential grammar issue that you are forces to use "as" for a query to be valid. For example: "from doc.object(XWiki.XWikiUsers) as user"
(using "from doc.object(XWiki.XWikiUsers)" will not work)
Anyway my main point is that if we start to use it a lot it makes it critical and we need somebody to take care of that since we will find bugs for sure.
Yes, I suggest we start using it right now (ie 2.4M2) for a few queries. We'll see how well it works and can always rollback if needed. -Vincent
On Jun 11, 2010, at 12:13 PM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 11:29, Vincent Massol <[email protected]> wrote:
On Jun 11, 2010, at 11:13 AM, Thomas Mortagne wrote:
On Fri, Jun 11, 2010 at 09:03, Vincent Massol <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
I think the major issue is that nobody knows it very well and without Artem to push on it and help we just forgot about it.
Also I think Artem was waiting JCR2 that was not release when he started working on it to finish XQL implementation that was too limited by JCR1.
XWQL is not tied to JCR (the execution engine is Hibernate right now). It's tied to JPQA but only at the grammar level (we have our grammer and our parser).
I talked about XQL not the query manager. I tough JPQL was part of JCR.
Yes that's another question: IMO we should move the query plugin outside of the core into the sandbox since I don't see a usage for it right now and xpath support should be added to the query module. Is anyone using it? Thanks -Vincent
Why do you think it's not finished? from what I've seen it looks finished and it worked well when I used it.
I said "i think".
I only saw a potential grammar issue that you are forces to use "as" for a query to be valid. For example: "from doc.object(XWiki.XWikiUsers) as user"
(using "from doc.object(XWiki.XWikiUsers)" will not work)
Thanks -Vincent
But yes we should really use XQL if possible.
Thanks -Vincent
+1 We need to get this more used. It's highly important for future portability, and the queries are much nicer. Ludovic Le 11/06/10 09:03, Vincent Massol a écrit :
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
+1 I've used it a little recently when writting applications, and indeed it's way nicer than our HQL way or querying. Starting to use it inside XE will help us spot potential bugs and limitations. +1 for the script service as well. Jerome. ----- "Vincent Massol" <[email protected]> wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Jun 11, 2010, at 9:03 AM, Vincent Massol wrote:
Hi devs,
I'm wondering why we haven't moved to using XQL instead of HQL.
Any reason?
If not, I'd like to suggest we start using it everywhere we currently use HQL since XWQL since is much nicer. Also since we don't use it our users don't use it.
Additionally I'd like to propose that we move to a ScriptService to access the query manager.
From Velocity you'd write the following to get a Query: $services.query.xwql("....")
Note that the ScriptService implementation would replace the SecureQueryManager implementation.
We would also deprecate XWiki.getQueryManager.
WDYT?
Done for the script service + documented at http://platform.xwiki.org/xwiki/bin/view/DevGuide/QueryGuide Feedback welcome before the XE 2.4 final release if you want to change something. Thanks -Vincent
participants (5)
-
Caleb James DeLisle -
Jerome Velociter -
Ludovic Dubost -
Thomas Mortagne -
Vincent Massol