Property

ext

Property

inner

ext  module:extensions

Methods

static

and(...queries) → Object

Builds an and-query

Parameter

Name Type Optional Description

queries

Object

 

sub queries

Value can be repeated.

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#and
Returns

Object or-query

static

boost(matching, boosting) → Object

Builds a boost-query

Parameters

Name Type Optional Description

matching

Object

 

matching query

boosting

Object

 

boosting query

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#boost
Returns

Object boost-query

static

collection(uris) → Object

Builds a collection-query

Parameter

Name Type Optional Description

uris

(repeatable String or Array of String)

 

the collection URIs to query (logical OR)

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#collection
Returns

Object collection-query

static

datatype()

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#datatype
static

directory(uris[, infinite]) → Object

Builds a directory-query

Parameters

Name Type Optional Description

uris

(repeatable String or Array of String)

 

the directory URIs to query (logical OR)

infinite

Boolean

Yes

whether to query into all sub-directories (defaults to true)

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#directory
Returns

Object directory-query

static

document(...uris) → Object

Builds a document-query

Parameter

Name Type Optional Description

uris

String

 

document URIs to match

Value can be repeated.

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#document
Returns

Object document-query

static

documentFragment(query) → Object

Builds a document-fragment-query

Parameter

Name Type Optional Description

query

Object

 

sub query to be constrained to document fragments

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#documentFragment
Returns

Object document-fragment-query

static

element()

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#element
static

locksFragment(query) → Object

Builds a locks-fragment-query

Parameter

Name Type Optional Description

query

Object

 

sub query to be constrained to document locks

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#locksFragment
Returns

Object locks-fragment-query

static

not(query) → Object

Builds a not-query

Parameter

Name Type Optional Description

query

Object

 

sub query to be negated

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#not
Returns

Object not-query

static

or(...queries) → Object

Builds an or-query

Parameter

Name Type Optional Description

queries

Object

 

sub queries

Value can be repeated.

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#or
Returns

Object or-query

static

propertiesFragment(query) → Object

Builds a properties-fragment-query

Parameter

Name Type Optional Description

query

Object

 

sub query to be constrained to properties fragments

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#propertiesFragment
Returns

Object properties-fragment-query

static

qname()

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#qname
static

range(indexedName[, datatype][, operator][, ...value][, rangeOptions]) → Object

Builds a range-query

Parameters

Name Type Optional Description

indexedName

(Object, String, or Array of String)

 

the name of a range index

datatype

Object

Yes

the type/collation of the range index (as returned by MLQueryBuilder#datatype)

operator

String

Yes

the query operator

value

any type

Yes

the values to compare

Value can be repeated.

rangeOptions

Object

Yes

the range query options (as returned by MLQueryBuilder#rangeOptions)

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#range
Returns

Object range-query

static

rangeOptions()

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#rangeOptions
static

term(...terms) → Object

Builds a term-query

Parameter

Name Type Optional Description

terms

String

 

terms to match (logical OR)

Value can be repeated.

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#term
Returns

Object term-query

static

where(...queries) → Object

Builds a structured query from a set of sub-queries

Parameter

Name Type Optional Description

queries

Object

 

sub queries

Value can be repeated.

See also
http://docs.marklogic.com/jsdoc/queryBuilder.html#where
Returns

Object structured query