Using inline methods for queries over in-memory Java collections

You can query in-memory collections in pureQuery by calling methods that are defined in the Data interface.

You create a Data object by using the overloaded DataFactory.get() method. When you call this method, do not pass a Connection or DataSource object. For example, you could create a new Data object with application logic like this:

Data data = DataFactory.getData();
The Data interface provides methods to perform the following operations:

You cannot perform SQL update operations (inserts, updates, and deletes) on objects that are in a collection.

If you use a method of the Data interface that does not support queries over in-memory collections, such as update() or queryList() with a RowHandler, pureQuery throws a java.lang.UnsupportedOperationException error at run time.

Attention: Data objects that you use for queries over in-memory collections are not thread safe. Do not share them between multiple threads. Use a Data object only in the same thread that it was created in.

Feedback