How can an object store be created using PouchDB?
I want to create an object store something like (which is like an SQL table) - codevar objectStore = db.createObjectStore((“SAMPLE_TABLE”, { keyPath: “ID” });code
And then insert multiple rows into it using
codevar transaction = db.transaction([“SAMPLE_TABLE”], "readwrite");
var objectStore = transaction.objectStore(“SAMPLE_TABLE”);
var request = objectStore.put({"rawData" : JSON.stringify(jObj), "ID" : number, "CALL_ID": callId});code
In PouchDB, I cannot see any API which can let me do this. I can create a document and then insert rows into it but then while traversing the same for update/delete/query there would be problem.
Something similar to this which YDN-DB do -
var schema = { stores:[{ name:'todo-1', keyPath:"timeStamp" }, { name:'todo-2', keyPath:"timeStamp" }] }; var dbTodo = new ydn.db.Storage('todo', schema);
Please let me know.
Warm Regards,
Himanshu
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/db18a9d1-c0c7-44dd-90d7-e2502a161530%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/NSHZ_cmLsPg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CAD2UGCW-NWejAfCPMvk0bgNrL7p_HypR3Db4QMCLk1q%3D6Qsrrg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CA%2Bhw%3DaukTT4vuWRLeLPH2Mhwc0Uj6U5vym3jMceMT9CFv6bMLg%40mail.gmail.com.