Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The username field you pass to init is basically the file name for the store, for example:</p> <p><code>WL.JSONStore.init(..., {username: 'store1'})</code></p> <p>You will have store1.sqlite on disk, no encryption. If you want to switch to another store simply call:</p> <p><code>WL.JSONStore.closeAll()</code></p> <p>The closeAll function will kill all database accessors. Then you can start a second store with a password, for example:</p> <p><code>WL.JSONStore.init(..., {username: 'store2', password: '123'})</code></p> <p>That will create a store2.sqlite file encrypted with 256-bit AES encryption.</p> <p>If you want to switch back to store1, simply call <code>WL.JSONStore.closeAll()</code> and then <code>WL.JSONStore.init(..., {username: 'store1'})</code>.</p> <p>Currently you can not access store1 and store2 at the same time. You can open a feature request <a href="https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014907906&amp;ps=25" rel="nofollow">here</a>. </p> <p>The .sqlite files are mentioned <a href="http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fdevref%2Fc_jsonstore_support.html" rel="nofollow">here</a> if you want to see them on the file system, and a bit of their internal structure is mentioned <a href="http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/r_jsonstore_store_internals.html" rel="nofollow">here</a>. The code snippets above don't show it, but make sure you take into account that most JSONStore API functions are async, read more <a href="http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/r_jsonstore_asynch_callbacks_promises.html" rel="nofollow">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload