CouchbaseLite
CouchbaseLite.openDb(name, installPrebuildDb) ⇒ Promise
Open database
Kind: static method of CouchbaseLite
Params
- name
string- Database name, if database with the given name does not exist it will be created. - installPrebuildDb
boolean- If true, database will be installed from the assets.
CouchbaseLite.getDocument(docId) ⇒ Promise
Get document properties
Kind: static method of CouchbaseLite
Fulfil: Object - Document properties
Params
- docId
string- Document id
CouchbaseLite.createDocument(properties) ⇒ Promise
Create new document
Kind: static method of CouchbaseLite
Fulfil: String - id of created document
Params
- properties
Object- Document properties
CouchbaseLite.updateDocument(docId, properties) ⇒ Promise
Update document properties
Kind: static method of CouchbaseLite
Params
- docId
String- Document id - properties
Object- Document properties
CouchbaseLite.deleteDocument(docId) ⇒ Promise
Update document properties
Kind: static method of CouchbaseLite
Params
- docId
String- Document id
CouchbaseLite.createLiveDocument(docId) ⇒ Promise
Start listening for document changes, returns current document properties immidiatly
Kind: static method of CouchbaseLite
Fulfil: String - unique id of live document, should be used to distinguish between updates of different live documents in the listener
Params
- docId
String- Document id
CouchbaseLite.destroyLiveDocument(uuid) ⇒ Promise
Stop listening for document changes
Kind: static method of CouchbaseLite
Params
- uuid
String- Live document UUID
CouchbaseLite.query(view, params) ⇒ Promise
Query existing Couchbase Lite view
Kind: static method of CouchbaseLite
Fulfil: Array - array of document properties
Params
- view
String- View name to query - params
Object- Query params
CouchbaseLite.createLiveQuery(view, params) ⇒ Promise
Start listening for query updates, returns current query data immidiatly
Kind: static method of CouchbaseLite
Fulfil: String - unique id of live query, should be used to distinguish between updates of different live queries in the listener
Params
- view
String- View name to query - params
Object- Query params
CouchbaseLite.destroyLiveQuery(uuid) ⇒ Promise
Stop listening for query changes
Kind: static method of CouchbaseLite
Params
- uuid
String- Live query UUID
CouchbaseLite.addAttachment(assetUri, attachmentName, docId) ⇒ Promise
Add attachment to document
Kind: static method of CouchbaseLite
Params
- assetUri
String- Asset URI to use as attachment - attachmentName
String- Attachment name - docId
String- Document id to add atachment to
CouchbaseLite.removeAttachment(attachmentName, docId) ⇒ Promise
Add attachment to document
Kind: static method of CouchbaseLite
Params
- attachmentName
String- Attachment name - docId
String- Document id to remove atachment from