Static methods

staticfromJson(json:String):Query

staticfromObject(obj:Dynamic):Query

Constructor

new()

Methods

default_():Query

Embeds the filters in the query defined by Env.initDefaultQuery in this one. If the query already has an specific filter set, it is not overriden by the default value.

Returns:

Query

equal(property:String, value:String):Query

Select objects with a property value equal to value.

Parameters:

property
value

Returns:

Query

forceRql(force:Bool):Query

Calling this method with a true argument makes the toPlain method return an RQL string representation instead of a plain list of query params.

Parameters:

force

Returns:

Query

greater(property:String, value:String):Query

Select objects with a property value greater than the value.

Parameters:

property
value

Returns:

Query

greaterOrEqual(property:String, value:String):Query

Select objects with a property value equal or greater than the value.

Parameters:

property
value

Returns:

Query

ilike(property:String, pattern:String):Query

Same as like but case unsensitive.

Parameters:

property
pattern

Returns:

Query

in_(property:String, array:Collection<String>):Query

Select objects where the specified property value is in the provided array.

Parameters:

property
array

Returns:

Query

lesser(property:String, value:String):Query

Select objects with a property value less than the value.

Parameters:

property
value

Returns:

Query

lesserOrEqual(property:String, value:String):Query

Select objects with a property value equal or less than the value.

Parameters:

property
value

Returns:

Query

like(property:String, pattern:String):Query

Search for the specified pattern in the specified property. The function is similar to the SQL LIKE operator, though it uses the * wildcard instead of %. To specify in a pattern the * symbol itself, it must be percent-encoded, that is, you need to specify %2A instead of *, see the usage examples below. In addition, it is possible to use the ? wildcard in the pattern to specify that any symbol will be valid in this position.

Parameters:

property
pattern

Returns:

Query

limit(amount:Int):Query

Indicates the given number of objects from the start position.

Parameters:

amount

Returns:

Query

notEqual(property:String, value:String):Query

Select objects with a property value not equal to value.

Parameters:

property
value

Returns:

Query

offset(page:Int):Query

Offset (page) to return on paged queries.

Parameters:

page

Returns:

Query

orderBy(property:String):Query

Order list by given property

Parameters:

property

Returns:

Query

ordering(propertyList:Collection<String>):Query

Order list of objects by the given properties (unlimited number of properties). The list is ordered first by the first specified property, then by the second, and so on. The order is specified by the prefix: + ascending order, - descending.

Parameters:

propertyList

Returns:

Query

out(property:String, array:Collection<String>):Query

Select objects where the specified property value is not in the provided array.

Parameters:

property
array

Returns:

Query

select(attributes:Collection<String>):Query

The function is applicable to a list of resources (hereafter base resources). It receives the list of attributes (up to 100 attributes) that can be primitive properties of the base resources, relation names, and relation names combined with properties of related resources. The output is the list of objects presenting the selected properties and related (linked) resources. Normally, when relations are selected, the base resource properties are also presented in the output.

Parameters:

attributes

Returns:

Query

toJson():String

Returns a Json representation of the Query.

Returns:

String

toObject():Dynamic

Returns a dynamic object with the fields of the Query.

Returns:

Dynamic

toPlain():String

Returns a string representation of this Query with the parameters compatible with query params syntax. It can be appended to a URL. If forceRql(true) was called on this Query, then it returns the string in RQL syntax, making this method equivalent to toString in that case.

Returns:

String

toString():String

Returns a string representation of this query in RQL syntax that can be appended to a URL.

Returns:

String