How to sync Pouchdb with Sencha Touch?

I will have Couchdb periodically syncing with Pouchdb in the browser.
I want to be able to display documents in Sencha Touch 2 + Phonegap app.

In particular (at least for now), I want to display them in a list, where each list item is one document field.

For example, if I have documents:

[{
    '_id': 'doc1',
    'name': 'Name1'
},
{
    '_id': 'doc2',
    'name': 'Name2'
}]

      

I may need the list items to be ["Name1", "Name2"].

How to do it? Do I have to sync with the repository first, or can I bypass them entirely?

Update:

One solution was to send PouchDB documents to a JSON file and then load the JSON into storage. That said, I'm still wondering if there is a better approach - ideally replace PouchDB -> JSON -> Store -> List with PouchDB -> List.

Perhaps my question above ("can I work around them completely") was wrong. I believe I need a store if I want to display this data.

+3


source to share





All Articles