Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Dataservice local AIR cache - User SQLite Query Possible??


Level 2

Hi All

Does anyone know if it is possible to query against offline cachid database (created by dataservices 2.6.1 and AIR 1.5.x)

So, for example I need to do something like:


The main reason I need to do this is, because I need to use the sql 'LIKE' keyword, rather than program my own 'smart' search routines...

Having loaded the dataservice cacheid db file, I can query against a table some tables but it seems obvious that the schema is not designed for users (like myself) to load and query against...but still worth asking:)

Any help, much appreciated.


0 Replies


Level 2

Jasen, try LiveCycle Data Service 3.1 released earlier this week. We have significantly enhanced the offline

functionality allowing you to use Data Management and JPQL to run local queries.



Level 2


Thankyou for your reply, sorry it took sooo long for me to acknowledge it:)

Unfornately, we do have access to DS3.1, we only have access to 2.61 ATM.

To get around this issue, we are using AdvancedDataGrid and using field sort for three fields. This is on 5000 or so items of flat data and it takes some time to complete the update (Apparently AIR2 has faster routines, but not sure how much faster...)

Look forward to having access to DS3.1 at some time in the future...but until then 2.61 is it.

Just to relaborate, we need to build a hiearchical tree from flat data,for example:

                 groupingCollection    =    new GroupingCollection();
                 grouping    =    new Grouping();
                 fields        =     new Array();

                 fields.push(new GroupingField( "web_Category_Level_1", true ));
                 fields.push(new GroupingField( "web_Category_Level_2", true ));
                 fields.push(new GroupingField( "web_Category_Level_3", true ));//this field is not always present

                 grouping.fields    =    fields;

                 groupingCollection.grouping    =    grouping;

However, some fields in the flat data only have two fields, thus only giving two levels in the tree, but I am not sure how to sort for two fields and/or three fields in the flat data returned from a dataService.fill().

Had looked into compare groupingObjectFunction and groupingCompareFunction but did not have much luck...

So, that is why I was hoping to be able to query the local dataservice cache directly and build the tree using lazy loading methods (just like using SQL queries on a remote server)




Level 2

I am not sure there is a way around your problem with LCDS 2.6.1 - 2.6.1 stores data in the local database as blobs and cannot be queried. As I had mentioned, this has been enhanced in 3.1 - now the data is stored in table and can be queried. If you are using Model Driven Development, the tool also generates the offline adapter to interact with the local database.



Level 2

Thanks Anil

I have posted a question in the flex forum asking for help with the sorting of either two/three fields.


The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now