Class: N1qlQuery

N1qlQuery


new N1qlQuery()

Class for dynamically construction of N1QL queries. This class should never be constructed directly, instead you should use the N1qlQuery.fromString static method to instantiate a N1qlStringQuery.

Since:
  • 2.0.0 (stability: committed)

Members


<static, readonly> Consistency :number

Enumeration for specifying N1QL consistency semantics.

Type:
  • number
Properties:
Name Type Default Description
NOT_BOUNDED number 1

This is the default (for single-statement requests).

REQUEST_PLUS number 2

This implements strong consistency per request.

STATEMENT_PLUS number 3

This implements strong consistency per statement.


<static, readonly> ProfileType :string

Enum representing the different query profiling modes.

Type:
  • string
Properties:
Name Type Default Description
PROFILE_NONE string off

Disables profiling. This is the default

PROFILE_PHASES string phases

This enables phase profiling.

PROFILE_TIMINGS string timings

This enables general timing profiling.

Since:
  • 2.4.6 (stability: committed)

Methods


<static> fromString(str)

Creates a query object directly from the passed query string.

Parameters:
Name Type Description
str string

The N1QL query string.

Since:
  • 2.0.0 (stability: committed)
Returns:
Type
N1qlStringQuery

toString()

Returns the fully prepared string representation of this query.