WL.JSONStore.getErrorMessage(errorCode)
Retrieve a string representation of a JSONStore error described by the errorCode parameter.
• errorCode – The error code for which we wish the textual message
The getErrorMessage() function returns a string representation of the message associated with the
error code.
WL.JSONStore.getPushRequired()
Retrieve a list of JSONStore documents that are considered "dirty" and need to be pushed back to
the back-end for update.
The getPushRequired() method returns an array of JSONStore documents.
WL.JSONStore.init()
Initializes one or more JSONStore collections. This is a per-requisite that must be performed
before accessing the store with the get() method.
If a collection has not been initialized before and a password is supplied the physical data hosting
the collection is encrypted using that password and a token. The token is generated either on the
client side (localkeygen is 'false') or on the server side (localkeygen is 'true').
• collections
◦ collectionName – The name of the collection to be initialized.
◦ searchFields – Description of which fields are indexed when documents are added to a
collection.
◦ additionalSearchFields – Description of which fields are indexed when documents are
added to a collection.
◦ adapter
▪ name – The name of the adapter which this JSONStore interacts with.
▪ add – The name of a procedure exposed by the adapter to be used to add documents
to the back-end through a call to the adapter.
▪ remove – The name of a procedure exposed by the adapter to be used to remove
documents from the back-end through a call to the adapter.
▪ load
• procedure
• params
• key
▪ accept
▪ timeout
• options
◦ username – Used to construct the underlying file name holding the store.
◦ password – The password required to access the collection.
Page 113
Comentários a estes Manuais