Party. Query

new Query(qb, model)

Parameters:
NameTypeDescription
qbmodule:Party.qb
modelmodule:Party.DocumentFactory

Methods

(static) all()

matches a list that is a superset of given list

Parameters:
TypeDescription

(static) and()

following path segments will be anded (default behavior)

Returns:

(static) contains(value)

Check if field contains value

Parameters:
NameTypeDescription
value*
Returns:

(static) dna()

Closes scope of most recent and

Returns:

(static) elem()

list operators -> subtype of match tree nodes -> most recent .where('param') path must be list for these to match searches for a single element of list matching all following conditions between elem .. mele nodes where('path') calls are relative to param path scope at opening of element match

(static) equals(value)

Check if field equals value

Parameters:
NameTypeDescription
value*
Returns:

(async, static) exec(hydrate)

return a promise resolving to result of query

Parameters:
NameTypeDescription
hydrateboolean
Returns:

(static) exists(flag)

Check if field exists

Parameters:
NameTypeDescription
flag*
Returns:

(static) gt(value)

Check if field is greater than value

Parameters:
NameTypeDescription
value*
Returns:

(static) id(id)

query for single msg by given id prereq -> type (not types) all other query ops (except type) will be ignored

Parameters:
NameTypeDescription
idstring

(static) ids(…ids)

query for a list of msgs by given ids prereq -> type (not types) all other query ops (except type) will be ignored

Parameters:
NameTypeAttributesDescription
idsany<repeatable>
Returns:

(static) in(…values)

Check if field is in list of values

Parameters:
NameTypeAttributesDescription
valuesany<repeatable>
Returns:

(static) limit(count)

limit # of msgs returned by query to a maximum of count

Parameters:
NameTypeDescription
count*
Returns:

(static) lt(value)

Check if field is less than value

Parameters:
NameTypeDescription
value*
Returns:

(static) mele()

Close elem function stack

(static) or()

The following path segments will be or'ed

Returns:

(static) owner(type, id)

restrict query to msgs with owner matching given type, id pair

Parameters:
NameTypeDescription
type*
id*
Returns:

(static) regex(value)

Check if field is matched by regex

Parameters:
NameTypeDescription
value*
Returns:

(static) ro()

Close scope of most recent or

Returns:

(static) seelct(filter)

filter fields from parameters of returned msgs

Parameters:
NameTypeDescription
filter*
Returns:

(static) size(count)

matches list with exactly count items

Parameters:
NameTypeDescription
countInteger

(static) sort(param, direction)

sort returned msgs on given param path (leading '-' reverses sort)

Parameters:
NameTypeDescription
param*
direction*
Returns:

(static) toJSON() → {Object}

Returns:
Type: 
Object

(static) type(type) → {module:Party.Query}

restrict query to msgs of given type

Parameters:
NameTypeDescription
typestring

Type name

Returns:
Type: 
module:Party.Query

(static) types(…types)

restrict query to msgs of given types not compatible with type

Parameters:
NameTypeAttributesDescription
typesstring<repeatable>
Returns:

(static) where(param)

sets context for following operations to given param path

Parameters:
NameTypeDescription
paramstring

Path to field