Global

Members


<readonly> exports :number

Enumeration of all error codes. See libcouchbase documentation for more details on what these errors represent.

Type:
  • number
Properties:
Name Type Default Description
success number CONST.SUCCESS

Operation was successful

authContinue number CONST.AUTH_CONTINUE

Authentication should continue.

authError number CONST.AUTH_ERROR

Error authenticating.

deltaBadVal number CONST.DELTA_BADVAL

The passed incr/decr delta was invalid.

objectTooBig number CONST.E2BIG

Object is too large to be stored on the cluster.

serverBusy number CONST.EBUSY

Server is too busy to handle your request right now.

cLibInternal number CONST.EINTERNAL

Internal libcouchbase error.

cLibInvalidArgument number CONST.EINVAL

An invalid arguement was passed.

cLibOutOfMemory number CONST.ENOMEM

The server is out of memory.

invalidRange number CONST.ERANGE

An invalid range was specified.

cLibGenericError number CONST.ERROR

An unknown error occured within libcouchbase.

temporaryError number CONST.ETMPFAIL

A temporary error occured. Try again.

keyAlreadyExists number CONST.KEY_EEXISTS

The key already exists on the server.

keyNotFound number CONST.KEY_ENOENT

The key does not exist on the server.

failedToOpenLibrary number CONST.DLOPEN_FAILED

Failed to open library.

failedToFindSymbol number CONST.DLSYM_FAILED

Failed to find expected symbol in library.

networkError number CONST.NETWORK_ERROR

A network error occured.

wrongServer number CONST.NOT_MY_VBUCKET

Operations were performed on the incorrect server.

notMyVBucket number CONST.NOT_MY_VBUCKET

Operations were performed on the incorrect server.

notStored number CONST.NOT_STORED

The document was not stored.

notSupported number CONST.NOT_SUPPORTED

An unsupported operation was sent to the server.

unknownCommand number CONST.UNKNOWN_COMMAND

An unknown command was sent to the server.

unknownHost number CONST.UNKNOWN_HOST

An unknown host was specified.

protocolError number CONST.PROTOCOL_ERROR

A protocol error occured.

timedOut number CONST.ETIMEDOUT

The operation timed out.

connectError number CONST.CONNECT_ERROR

Error connecting to the server.

bucketNotFound number CONST.BUCKET_ENOENT

The bucket you request was not found.

clientOutOfMemory number CONST.CLIENT_ENOMEM

libcouchbase is out of memory.

clientTemporaryError number CONST.CLIENT_ETMPFAIL

A temporary error occured in libcouchbase. Try again.

badHandle number CONST.EBADHANDLE

A bad handle was passed.

serverBug number CONST.SERVER_BUG

A server bug caused the operation to fail.

invalidHostFormat number CONST.INVALID_HOST_FORMAT

The host format specified is invalid.

notEnoughNodes number CONST.DURABILITY_ETOOMANY

Not enough nodes to meet the operations durability requirements.

duplicateItems number CONST.DUPLICATE_COMMANDS

Duplicate items.

noMatchingServerForKey number CONST.NO_MATCHING_SERVER

Key mapping failed and could not match a server.

badEnvironmentVariable number CONST.BAD_ENVIRONMENT

A bad environment variable was specified.

clientBusy number CONST.BUSY

The client is too busy to process further requests.

invalidUsername number CONST.INVALID_USERNAME

An invalid username was passed.

configCacheInvalid number CONST.CONFIG_CACHE_INVALID

The configuration cache is invalid.

saslmechUnavailable number CONST.SASLMECH_UNAVAILABLE

The requested SASL mechanism was unavailable.

tooManyRedirects number CONST.TOO_MANY_REDIRECTS

Too many HTTP redirects were encountered.

mapChanged number CONST.MAP_CHANGED

The configuration map has changed.

incompletePacket number CONST.INCOMPLETE_PACKET

An incomplete packet was received.

connectionRefused number CONST.ECONNREFUSED

Connection was refused.

socketShutdown number CONST.ESOCKSHUTDOWN

The socket was shut down.

connectionReset number CONST.ECONNRESET

The connection was reset.

cannotGetPort number CONST.ECANTGETPORT

Failed to get the port.

fdLimitReached number CONST.EFDLIMITREACHED

The systems FD limit was received.

netUnreachable number CONST.ENETUNREACH

The network was unreachable.

ctlUnknown number CONST.ECTL_UNKNOWN

An unknown cntl value was specified.

ctlUnsupportedMode number CONST.ECTL_UNSUPPMODE

An unsupported cntl mode was specified.

ctlBadArguments number CONST.ECTL_BADARG

An invalid cntl argument

emptyKey number CONST.EMPTY_KEY

An empty key was specified.

sslError number CONST.SSL_ERROR

An SSL error occurred.

sslCantVerify number CONST.SSL_CANTVERIFY

Verification of the SSL host failed

internalSchedulingFailure number CONST.SCHEDFAIL_INTERNAL

An internal scheduling error occurred.

clientFeatureUnavailable number CONST.CLIENT_FEATURE_UNAVAILABLE

A requested client feature is unavailable.

optionsConflict number CONST.OPTIONS_CONFLICT

Conflicting options were specified.

httpError number CONST.HTTP_ERROR

A generic HTTP error has occurred.

durabilityNoMutationTokens number CONST.DURABILITY_NO_MUTATION_TOKENS

Durability checks failed due to missing mutation tokens.

unknownMemcachedError number CONST.UNKNOWN_MEMCACHED_ERROR

An unknown memcached error has occurred.

mutationLost number CONST.MUTATION_LOST

A mutation was lost.

subdocPathNotFound number CONST.SUBDOC_PATH_ENOENT

Sub-document path was not found.

subdocPathMismatch number CONST.SUBDOC_PATH_MISMATCH

Sub-document path mismatch.

subdocPathInvalid number CONST.SUBDOC_PATH_EINVAL

Sub-document path was invalid.

subdocPathTooBig number CONST.SUBDOC_PATH_E2BIG

Sub-document path was too big.

subdocDocTooDeep number CONST.SUBDOC_DOC_E2DEEP

Sub-document document is too deep.

subdocCannotInsertValue number CONST.SUBDOC_VALUE_CANTINSERT

Sub-document value insertion failed

subdocDocumentNotJson number CONST.SUBDOC_DOC_NOTJSON

Sub-document document is not JSON.

subdocInvalidRange number CONST.SUBDOC_NUM_ERANGE

Sub-document value was out of range.

subdocBadDelta number CONST.SUBDOC_BAD_DELTA

Invalid delta passed to sub-document operation.

subdocPathExists number CONST.SUBDOC_PATH_EEXISTS

Sub-document path already exists.

subdocMultiFailure number CONST.SUBDOC_MULTI_FAILURE

Sub-document multi-operation failed.

subdocValueTooDeep number CONST.SUBDOC_VALUE_E2DEEP

Sub-document value was too deep

invalidArgument number CONST.EINVAL_MCD

An invalid argument was passed to the Server.

emptyPath number CONST.EMPTY_PATH

Sub-document path was empty.

unknownSubdocCommand number CONST.UNKNOWN_SDCMD

Unknown sub-document command encountered.

noCommands number CONST.ENO_COMMANDS

Sub-document operations list was empty.

queryError number CONST.QUERY_ERROR

A query error occurred.

genericTmpError number CONST.GENERIC_TMPERR

A generic temporary error occurred.

genericSubdocError number CONST.GENERIC_SUBDOCERR

A generic sub-document error occured.

genericConstraintError number CONST.GENERIC_CONSTRAINT_ERR

A generic constraint error occured.

outOfMemory number CONST['ErrorCode::MEMORY']

Couchnode is out of memory.

invalidArguments number CONST['ErrorCode::ARGUMENTS']

Invalid arguements were passed.

schedulingError number CONST['ErrorCode::SCHEDULING']

An error occured while trying to schedule the operation.

checkResults number CONST['ErrorCode::CHECK_RESULTS']

Not all operations completed successfully.

genericError number CONST['ErrorCode::GENERIC']

A generic error occured in Couchnode.

durabilityFailed number CONST['ErrorCode::DURABILITY_FAILED']

The specified durability requirements could not be satisfied.

restError number CONST['ErrorCode::REST']

An error occured during a RESTful operation.


<readonly> ServiceType :string

Enum representing the different services inside a Couchbase cluster.

Type:
  • string
Properties:
Name Type Default Description
Config string config
KeyValue string kv
Views string view
Query string query
Search string search
Analytics string analytics
Since:
  • 2.4.4 (stability: uncommitted)

Methods


date(field, size)

date creates a Couchbase Search date facet.

Parameters:
Name Type Description
field string
size number
Returns:
Type
DateFacet

enableLogging(opts)

Enables logging, optionally through a custom logging function.

Parameters:
Name Type Description
opts Object | function

An options object or logging function.

Properties
Name Type Description
colorize string

What to colorize in the console output.

level string

Minimum level to log.

filename string

The file path you wish to log to.

console boolean

Whether to log to the console.


lcbSeverityToLevel(severity)

Translates a libcouchbase logging severity into a winston log level string.

Parameters:
Name Type Description
severity Number

The libcouchbase logging severity.


numeric(field, size)

numeric creates a Couchbase Search numeric facet.

Parameters:
Name Type Description
field string
size number
Returns:
Type
NumericFacet

term(field, size)

term creates a Couchbase FTS term facet.

Parameters:
Name Type Description
field string
size number
Returns:
Type
TermFacet