Show:

Class of builder for query. Uses method chaining.

Constructor

Builder

(
  • store
  • modelName
)

Parameters:

  • store Store

    Store for building query.

  • modelName String

    The name of the requested entity.

Methods

build

() Object public

Builds query instance using all provided data.

Returns:

Object:

Query instance.

byId

(
  • id
)
Query.Builder public chainable

Sets the id of the requested entity.

Parameters:

Returns:

Query.Builder:

Returns this instance.

count

() Query.Builder public chainable

Returns:

Query.Builder:

Returns this instance.

from

(
  • modelName
)
Query.Builder public chainable

Sets the name of the requested entity.

Parameters:

  • modelName String

    The name of the requested entity.

Returns:

Query.Builder:

Returns this instance.

isOf

(
  • typeName
)
Query.Builder public chainable

Restricts the selectable objects to the specified type.

Parameters:

  • typeName String

    The model name of which the selectable objects should be assigned.

Returns:

Query.Builder:

Returns this instance.

ofDataType

(
  • dataType
)
Query.Builder public chainable

Parameters:

  • dataType String

    The name of the data type.

Returns:

Query.Builder:

Returns this instance.

orderBy

(
  • property
)
Query.Builder public chainable

Parameters:

Returns:

Query.Builder:

Returns this instance.

select

(
  • attributes
)
Query.Builder public chainable

Adds attributes for selection. Automatically checks duplications.

Parameters:

Returns:

Query.Builder:

Returns this instance.

selectByProjection

(
  • projectionName
  • idFromProjection
)
Query.Builder public chainable

Adds attributes for selection from specified projection. Merges attributes with added using select.

Parameters:

  • projectionName String

    The name of the projection.

  • idFromProjection Boolean

Returns:

Query.Builder:

Returns this instance.

skip

(
  • skip
)
Query.Builder public chainable

Parameters:

Returns:

Query.Builder:

Returns this instance.

top

(
  • top
)
Query.Builder public chainable

Parameters:

Returns:

Query.Builder:

Returns this instance.

where

(
  • args
)
Query.Builder public chainable

Parameters:

Returns:

Query.Builder:

Returns this instance.

withCustomParams

(
  • customQueryParams
)
Query.Builder public chainable

Parameters:

Returns:

Query.Builder:

Returns this instance.