queryBuilder
Source: query-builder-lite.
Property
Methods
Property
ext module:extensions
Methods
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
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
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
datatype()
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 |
- See also
- http://docs.marklogic.com/jsdoc/queryBuilder.html#directory
- Returns
-
Object
directory-query
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
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
element()
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
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
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
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
qname()
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
rangeOptions()
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
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