Members
mirrors native couchbase sdk require('couchbase').errors
Type:
Object
mirrors native couchbase sdk require('couchbase').errors
Type:
Object
Type:
StorageAdapterErrorList
Type:
StorageAdapterErrorList
Constructor
- options optional
- Type:
Object
- bucket optional
- Type:
Bucket
StorageAdapter
Parameters:
Throws:
Methods
- key
- Type:
Key
- value
- Type:
mixed
- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- documents
- Type:
[Document, ...]
- options optional
- Type:
Object
- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- documents
- Type:
[Document, ...]
- options optional
- Type:
Object
- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- key
- Type:
[(string | Buffer), ...]
- value
- Type:
integer
- options optional
- Type:
Object
- initial optional
- Type:
integer
optional
Sets the initial value for the document if it does not exist. Specifying a value of undefined will cause the operation to fail if the document does not exist, otherwise this value must be equal to or greater than 0.- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- hosts
- Type:
string
or[string, ...]
- key
- Type:
string
orKey
- key
- Type:
Key
- options optional
- Type:
Object
- paranoid optional
- Type:
boolean
default=
true
if false, both deleted and non-deleted documents will be returned. iftrue
, it'll throwStorageError
(not found) for a document which was sof-deleted.- deletedAtPropName optional
- Type:
string
should be provided if
options.paranoid
=== false- key
- Type:
Key
- options optional
- Type:
Object
- lockTime optional
- Type:
integer
time in seconds, default=15, max=30
- key
- Type:
Key
- expiry
- Type:
integer
time in seconds. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- options
- Type:
Object
- key
- Type:
Key
- options optional
- Type:
Object
- index optional
- Type:
intger
optional
The index for which replica you wish to retrieve this value from, or if undefined, use the value from the first server that replies.- key
- Type:
Key
- data
- Type:
mixed
- options optional
- Type:
Object
- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- key
- Type:
Key
- value
- Type:
mixed
- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- query
- Type:
ViewQuery
orN1qlQuery
The query to execute
- params
- Type:
Object
orArray
optional
A list or map to do replacements on a N1QL query.- key
- Type:
Key
- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- key
- Type:
Key
- value
- Type:
mixed
- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- key
- Type:
Key
- expiry
- Type:
integer
In seconds. The expiration time to use. If a value of 0 is provided, then the current expiration time is cleared and the key is set to never expire. Otherwise, the key is updated to expire in the time provided. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- options optional
- Type:
Object
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes- key
- Type:
Key
- cas
- Type:
Bucket.CAS
The CAS value returned when the key was locked. This operation will fail if the CAS value provided does not match that which was the result of the original lock operation.
- options
- Type:
Object
- key
- Type:
Key
- value
- Type:
mixed
- options optional
- Type:
Object
- cas optional
- Type:
BucketCAS
optional
The CAS value to check. If the item on the server contains a different CAS value, the operation will fail. Note that if this option is undefined, no comparison will be performed.- expiry optional
- Type:
integer
- Default:
0
Set the initial expiration time for the document. A value of 0 represents never expiring. If the value is greater than number of seconds in one month, the value must be provided in unix timestamp format.
- persist_to optional
- Type:
integer
optional
default=0
Ensures this operation is persisted to this many nodes- replicate_to optional
- Type:
integer
optional
default=0
Ensures this operation is replicated to this many nodes
Promise<Object>
Parameters:
Promise<Object>
Promise<[PromiseInspection>, ...]
aync version
Parameters:
Promise<[PromiseInspection>, ...]
Promise<Array>
Parameters:
Promise<Array>
Promise<[PromiseInspection>, ...]
async version retruns always fullfiled promise with response implementing PromiseInspection
Parameters:
Promise<[PromiseInspection>, ...]
Promise<Array>
Parameters:
Throws:
Returns:Promise<Array>
Promise<Object>
Increments or decrements a key's numeric value. Note that JavaScript does not support 64-bit integers (while libcouchbase and the server do). You might receive an inaccurate value if the number is greater than 53-bits (JavaScript's maximum integer precision).
Parameters:
Promise<Object>
Parameters:
boolean
fake exists
method which will perform insert
operation.
If the operation succeeds, the inserted document is removed and true
is returned, otherwise false
is returned
Note: In the future it could be replaced by LookupInBuilder.exists
method (currently unstable)
Currently, the most reliable option is to perform get
operation
(downside is that it is needless "wasting" of bandwidth, especially for larger documents)
Parameters:
boolean
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Parameters:
Promise<Object>
BucketManager
Returns an instance of a BucketManager for performing management operations against a bucket.
Returns:BucketManager
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Parameters:
Promise<Object>
Promise<(Bucket.ViewQueryResponse | Bucket.N1qlQueryResponse)>
Executes a previously prepared query object. This could be a ViewQuery or a N1qlQuery.
Parameters:
Promise<(Bucket.ViewQueryResponse | Bucket.N1qlQueryResponse)>
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Identical to Bucket#set, but will only succeed if the document exists already.
Parameters:
Promise<Object>
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Parameters:
Promise<Object>
Promise<Object>
Identical to Bucket#set, but will only succeed if the document exists already.
Parameters:
Promise<Object>