CouchbaseLite
Promise
CouchbaseLite.openDb(name, installPrebuildDb) ⇒ 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.
Promise
CouchbaseLite.getDocument(docId) ⇒ Get document properties
Kind: static method of CouchbaseLite
Fulfil: Object
- Document properties
Params
- docId
string
- Document id
Promise
CouchbaseLite.createDocument(properties) ⇒ Create new document
Kind: static method of CouchbaseLite
Fulfil: String
- id of created document
Params
- properties
Object
- Document properties
Promise
CouchbaseLite.updateDocument(docId, properties) ⇒ Update document properties
Kind: static method of CouchbaseLite
Params
- docId
String
- Document id - properties
Object
- Document properties
Promise
CouchbaseLite.deleteDocument(docId) ⇒ Update document properties
Kind: static method of CouchbaseLite
Params
- docId
String
- Document id
Promise
CouchbaseLite.createLiveDocument(docId) ⇒ 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
Promise
CouchbaseLite.destroyLiveDocument(uuid) ⇒ Stop listening for document changes
Kind: static method of CouchbaseLite
Params
- uuid
String
- Live document UUID
Promise
CouchbaseLite.query(view, params) ⇒ 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
Promise
CouchbaseLite.createLiveQuery(view, params) ⇒ 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
Promise
CouchbaseLite.destroyLiveQuery(uuid) ⇒ Stop listening for query changes
Kind: static method of CouchbaseLite
Params
- uuid
String
- Live query UUID
Promise
CouchbaseLite.addAttachment(assetUri, attachmentName, docId) ⇒ 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
Promise
CouchbaseLite.removeAttachment(attachmentName, docId) ⇒ Add attachment to document
Kind: static method of CouchbaseLite
Params
- attachmentName
String
- Attachment name - docId
String
- Document id to remove atachment from