Builder Class
addon/query/builder.js:22
Class of builder for query. Uses method chaining.
Constructor
Item Index
Methods
build
()
Object
public
Builds query instance using all provided data.
Returns:
Query instance.
byId
-
id
Sets the id of the requested entity.
Returns:
Returns this instance.
count
()
Query.Builder
public
chainable
Returns:
Returns this instance.
from
-
modelName
Sets the name of the requested entity.
Parameters:
-
modelName
StringThe name of the requested entity.
Returns:
Returns this instance.
isOf
-
typeName
Restricts the selectable objects to the specified type.
Parameters:
-
typeName
StringThe model name of which the selectable objects should be assigned.
Returns:
Returns this instance.
ofDataType
-
dataType
Parameters:
-
dataType
StringThe name of the data type.
Returns:
Returns this instance.
orderBy
-
property
Parameters:
-
property
String
Returns:
Returns this instance.
select
-
attributes
Adds attributes for selection. Automatically checks duplications.
Parameters:
-
attributes
String
Returns:
Returns this instance.
selectByProjection
-
projectionName
-
idFromProjection
Adds attributes for selection from specified projection.
Merges attributes with added using select
.
Returns:
Returns this instance.
skip
-
skip
Parameters:
-
skip
Number
Returns:
Returns this instance.
top
-
top
Parameters:
-
top
Number
Returns:
Returns this instance.
where
-
args
Parameters:
-
args
Object multiple
Returns:
Returns this instance.
withCustomParams
-
customQueryParams
Parameters:
-
customQueryParams
Object
Returns:
Returns this instance.