JPQL2

As mentioned earlier DataNucleus querying capabilities are being progressively rewritten, making use of a “generic” query compilation. In the previous post I mentioned a new implementation of JDOQL. This now implements the vast majority of querying capabilities required with one exception … variables (to be added soon hopefully). In addition, for this RDBMS implementation, you can evaluate queries

  • Totally in the datastore.
  • Totally in-memory (you supply the candidate instances, and it queries over those instances).
  • Retrieve all candidates from the datastore, and evaluate the filter, result etc in memory.

SVN trunk now has a new addition following the same basic idea … “JPQL2”. This implements JPQL using the same underlying SQL API, and using the bulk of the new code added for “JDOQL2”. Since JPQL doesn’t support variables then this implementation is close to complete (with the exception of bulk update/delete – to be added soon).

One important feature to note is that a user can contribute their own implementation of various methods, or functions by adding their own plugin (just a single method typically). See the docs for an example.

The intention is to make these new implementations the default in the next major release of DataNucleus Access Platform. To try them out add the following persistence properties

datanucleus.query.JDOQL.implementation=JDOQL2
datanucleus.query.JPQL.implementation=JPQL2
Advertisements
This entry was posted in DataNucleus, java, JDO, JDOQL, JPA, JPQL, Persistence. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s