Class: module:argos/Store/PouchDB

module:argos/Store/PouchDB()

new module:argos/Store/PouchDB()

Source:

Members

data

Properties:
Name Type Description
data Array

Array of objects. If the store has a collection of cached objects, it can make this available in this property.

Source:

databaseName

Properties:
Name Type Description
databaseName String

Name of the local PouchDB database

Source:

idProperty

Properties:
Name Type Description
idProperty String

Name of the property to use as the identifier

Source:

Methods

add(object, addOptions)

Creates an object, throws an error if the object already exists.

Parameters:
Name Type Description
object Object

The object to store

addOptions Object

Additional directives for creating objects

Properties
Name Type Description
overwrite Boolean
Source:

getChildren()

Not implemented in this store.

Source:

getIdentity(object, string) → {String|Number}

Returns an object's identity using this.idProperty

Parameters:
Name Type Description
object Object

The object to get the identity from

string String

The optional identity property

Source:
Returns:
Type
String | Number

getMetadata(object) → {Object|String|Number}

Returns any metadata about the object. This may include attribution, cache directives, history, or version information.

Parameters:
Name Type Description
object Object

The object to return metadata for.

Source:
Returns:
  • Object containing the metadata.

    Type
    Object
  • return.id

    Type
    String | Number

getRevision(object) → {String}

Returns an object's revision using this.revisionProperty

Parameters:
Name Type Description
object Object

The object to get the revision from

Source:
Returns:
Type
String

put(object, putOptions) → {String|Number}

Stores an object.

Parameters:
Name Type Description
object Object

The object to store.

putOptions Object

Additional directives for storing objects.

Properties
Name Type Description
id String | Number
entity String | Object
version String
overwrite Boolean
Source:
Returns:
Type
String | Number

query(query, queryOptions) → {dojo.store.api.Store.QueryResults}

Queries the store for objects. This does not alter the store, but returns a set of data from the store.

Parameters:
Name Type Description
query String | Object | function

The query to use for retrieving objects from the store. A map function by itself (no reduce). A full CouchDB-style map/reduce object: {map : ..., reduce: ...}. The name of a view in an existing design document (e.g. 'myview' or 'mydesigndoc/myview').

queryOptions Object
Source:
Returns:
Type
dojo.store.api.Store.QueryResults

remove(id) → {window.Promise}

Removes the document given the id

Parameters:
Name Type Description
id
Source:
Returns:
Type
window.Promise

transaction()

Not implemented in this store.

Source:

module:argos/Store/PouchDB()

new module:argos/Store/PouchDB()

Source:

Members

data

Properties:
Name Type Description
data Array

Array of objects. If the store has a collection of cached objects, it can make this available in this property.

Source:

databaseName

Properties:
Name Type Description
databaseName String

Name of the local PouchDB database

Source:

idProperty

Properties:
Name Type Description
idProperty String

Name of the property to use as the identifier

Source:

Methods

add(object, addOptions)

Creates an object, throws an error if the object already exists.

Parameters:
Name Type Description
object Object

The object to store

addOptions Object

Additional directives for creating objects

Properties
Name Type Description
overwrite Boolean
Source:

getChildren()

Not implemented in this store.

Source:

getIdentity(object, string) → {String|Number}

Returns an object's identity using this.idProperty

Parameters:
Name Type Description
object Object

The object to get the identity from

string String

The optional identity property

Source:
Returns:
Type
String | Number

getMetadata(object) → {Object|String|Number}

Returns any metadata about the object. This may include attribution, cache directives, history, or version information.

Parameters:
Name Type Description
object Object

The object to return metadata for.

Source:
Returns:
  • Object containing the metadata.

    Type
    Object
  • return.id

    Type
    String | Number

getRevision(object) → {String}

Returns an object's revision using this.revisionProperty

Parameters:
Name Type Description
object Object

The object to get the revision from

Source:
Returns:
Type
String

put(object, putOptions) → {String|Number}

Stores an object.

Parameters:
Name Type Description
object Object

The object to store.

putOptions Object

Additional directives for storing objects.

Properties
Name Type Description
id String | Number
entity String | Object
version String
overwrite Boolean
Source:
Returns:
Type
String | Number

query(query, queryOptions) → {dojo.store.api.Store.QueryResults}

Queries the store for objects. This does not alter the store, but returns a set of data from the store.

Parameters:
Name Type Description
query String | Object | function

The query to use for retrieving objects from the store. A map function by itself (no reduce). A full CouchDB-style map/reduce object: {map : ..., reduce: ...}. The name of a view in an existing design document (e.g. 'myview' or 'mydesigndoc/myview').

queryOptions Object
Source:
Returns:
Type
dojo.store.api.Store.QueryResults

remove(id) → {window.Promise}

Removes the document given the id

Parameters:
Name Type Description
id
Source:
Returns:
Type
window.Promise

transaction()

Not implemented in this store.

Source: