Table of Contents

Documentation / queries/IQueryFor

queries/IQueryFor

Interfaces

IQueryFor<TDataType, TArguments>

Defines the base of a query.

Extends

Type Parameters

TDataType

Type of model the query is for.

TArguments = object

Optional type of arguments to use for the query.

Properties

defaultValue

readonly defaultValue: TDataType

Defined in

queries/IQueryFor.ts:17

requiredRequestArguments

readonly requiredRequestArguments: string[]

Defined in

queries/IQueryFor.ts:16

route

readonly route: string

Defined in

queries/IQueryFor.ts:14

routeTemplate

readonly routeTemplate: TemplateDelegate

Defined in

queries/IQueryFor.ts:15

Accessors

arguments
Get Signature

get arguments(): undefined | TArguments

Gets the current arguments for the query.

Returns

undefined | TArguments

Set Signature

set arguments(value): void

Sets the current arguments for the query.

Parameters
value

TArguments

Returns

void

Defined in

queries/IQueryFor.ts:22

paging
Get Signature

get paging(): Paging

Gets the paging for the query.

Returns

Paging

Set Signature

set paging(value): void

Sets the paging for the query.

Parameters
value

Paging

Returns

void

Inherited from

IQuery.paging

Defined in

queries/IQuery.ts:25

sorting
Get Signature

get sorting(): Sorting

Gets the sorting for the query.

Returns

Sorting

Set Signature

set sorting(value): void

Sets the sorting for the query.

Parameters
value

Sorting

Returns

void

Inherited from

IQuery.sorting

Defined in

queries/IQuery.ts:15

Methods

perform()

perform(args?): Promise<QueryResult<TDataType>>

Perform the query, optionally giving arguments to use. If not given, it will use the arguments that has been set. By specifying the arguments, it will use these as the current arguments for the instance and subsequent calls does not need to specify arguments.

Parameters
args?

TArguments

Optional arguments for the query - depends on whether or not the query needs arguments.

Returns

Promise<QueryResult<TDataType>>

for the model

Defined in

queries/IQueryFor.ts:36

setApiBasePath()

setApiBasePath(apiBasePath): void

Set the base path for the API to use for the query. This is used to prepend to the path to any fetch operation.

Parameters
apiBasePath

string

Base path for the API

Returns

void

Inherited from

IQuery.setApiBasePath

Defined in

ICanBeConfigured.ts:18

setMicroservice()

setMicroservice(microservice): any

Set the microservice to be used for the query. This is passed along to the server to identify the microservice.

Parameters
microservice

string

Name of microservice

Returns

any

Inherited from

IQuery.setMicroservice

Defined in

ICanBeConfigured.ts:12