+

Search Tips | Advanced Search

Skip navigation links

Index Overview

PREV CLASS NEXT CLASS FRAMES (opens in new window)



Class WL.JSONStore.JSONStoreInstance

WL.JSONStore.JSONStoreInstance


Method Summary
Method Attributes Method Name and Description
 

add(data, options)

Stores data as documents inside a collection.

 

advancedFind(query, options)

Locates a document inside a collection by using query parts.

 

change(data, options)

Used to load data when existing data exists in the store.

 

clear()

Clears a collection for reuse.

 

count(query, options)

Returns the number of documents inside a collection.

 

countAllDirty(options)

Returns the number of documents with local-only changes (that is, dirty documents).

 

enhance(name, fn)

The enhance function allows developers to extend the core API to better fit their needs.

 

erase(doc, options)

Deletes a document from the collection.

 

find(query, options)

Locates a document inside a collection using a query.

 

findAll(options)

Returns all of the documents stored in a collection.

 

findById(data, options)

Returns one or more documents that match the

    _id that is supplied to the function.
    							
    						
    					
    						
 

getAllDirty(options)

Returns all documents that are marked dirty.

 

isDirty(doc, options)

Returns a boolean that is true if the document is dirty, false otherwise.

 

load(options)

Gets data that is defined in the load portion of the adapter.

 

markClean(docs)

Marks an array of documents as clean.

 

push(options)

Pushes documents inside the collection that have local-only changes to an IBM® MobileFirst® adapter that is linked during the init function.

 

pushSelected(doc, options)

Pushes only the selected documents.

 

refresh(doc, options)

Replaces a document with another document.

 

remove(doc, options)

Marks a document as deleted inside a collection.

 

removeCollection(options)

Deletes all the documents that are stored inside a collection.

 

replace(doc, options)

Overwrites a document with a given document.

 

store(data, options)

Writes data to a collection.

 

toString(limit, offset)

Prints the contents of the collection by using WL.Logger.debug asynchronously.

Method Detail

add

{Promise} add(data, options)

Stores data as documents inside a collection.


advancedFind

{Promise} advancedFind(query, options)

Locates a document inside a collection by using query parts.

The ability to search using between, inside, lessThan, greaterThan, etc. in your query search. Consider using the following helper