Constructor
- options optional
- Type:
Object - key optional
- Type:
stringorKey optionalmay be set later- data optional
- Type:
mixed - cas optional
- Type:
CAS optional- storage optional
- Type:
StorageAdapter - isNewRecord optional
- Type:
boolean default=
true
Document
Parameters:
Throws:
Methods
- property optional
- Type:
string - options
- Type:
Object See StorageAdapter.insert for available options
StorageError
- options
- Type:
Object See StorageAdapter.remove for available options
- options
- Type:
Object See StorageAdapter.replace for available options
StorageError
- cas
- Type:
CAS DocumentError
- expiry
- Type:
integer time in seconds
- options
- Type:
Object see
StorageAdapter#touchfor available optionsStorageError
CAS or null
CAS or null
mixed
Parameters:
mixed
Promise<{mixed}>
Promise<{mixed}>
StorageAdapter or null
StorageAdapter or null
boolean
boolean
Promise<Document>
Inserts new document. This is an atomic operation which always operates on single document only.
Parameters:
Throws:
Promise<Document>
Promise<Object>
Removes the document identified by its key. This is an atomic operation which always operates on single document only.
Parameters:
Promise<Object>
Promise<Document>
Replaces (updates) the document identified by its key. This is an atomic operation which always operates on single document only.
Parameters:
Throws:
Promise<Document>
undefined
Parameters:
undefined
Document
undefined
Throws:
undefined
string
string
Promise<Document>
Touches the document identified by its key. This is an atomic operation which always operates on single document only.
Parameters:
Throws:
Promise<Document>