Community
Participate
Working Groups
Support SQL as a CDOQuery language
Created attachment 141141 [details] SQL Query Implementation The attached patch implements the server side SQL query for CDO. I also converted the HibernateQueryTest to SqlQueryTest, with the exception of two test cases. Some longer join queries for which I simply have not enough time. All tests run fine. Please review the patch, especially the two parameters I had to introduce: QUERY_STATEMENT: If set to true then an statement.executeQuery is executed, set to false an statement.executeUpdate is executed (I need that for builing up an index sometimes). CDO_OBJECT_QUERY: If set to true then the result is packed into an CDOIDLongImpl, otherwise the result is directly added to the context. The SQL Query supports named parameters "SELECT cdo_id FROM Company WHERE name LIKE :name", parameter by indices are not supported (I don't see any reason for it, by name is far superior). Everything is documented in the javadoc comment.
Kai, can you please confirm here that: 1) The number of lines that you changed (after copying from HibernateQueryHandler) is smaller than 250. 2) You are the only author of these changed lines. 3) You apply the EPL to these changed lines. If your contribution is bigger than 250 lines, it is not considered small anymore and we need to go through a bigger legal process with paperwork for you.
I added a check for SQL language in DBStoreAccessor.getQueryHandler(CDOQueryInfo). I added cleanup of statement and resultSet. I used equalsIgnoreCase(). I added the tests to the test framework.
Committed to HEAD.
(In reply to comment #2) > Kai, can you please confirm here that: > > 1) The number of lines that you changed (after copying from > HibernateQueryHandler) is smaller than 250. yes > > 2) You are the only author of these changed lines. yes > > 3) You apply the EPL to these changed lines. yes
Thx! And I forgot to say: Well done ;-)
*** Bug 282970 has been marked as a duplicate of this bug. ***
Available in 3.0 GA: http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/