Table of Contents

Documentation / queries/QueryFor

queries/QueryFor

Classes

abstract QueryFor<TDataType, TArguments>

Represents an implementation of IQueryFor.

Type Parameters

TDataType

Type of data returned by the query.

TArguments = object

Implements

Constructors

new QueryFor()

new QueryFor<TDataType, TArguments>(modelType, enumerable): QueryFor<TDataType, TArguments>

Initializes a new instance of the ObservableQueryFor<,>} class.

Parameters
modelType

Constructor

Type of model, if an enumerable, this is the instance type.

enumerable

boolean

Whether or not it is an enumerable.

Returns

QueryFor<TDataType, TArguments>

Defined in

queries/QueryFor.ts:36

Properties

abortController?

optional abortController: AbortController

Defined in

queries/QueryFor.ts:26

arguments

arguments: undefined | TArguments

Gets the current arguments for the query.

Implementation of

IQueryFor.arguments

Defined in

queries/QueryFor.ts:29

defaultValue

abstract defaultValue: TDataType

Implementation of

IQueryFor.defaultValue

Defined in

queries/QueryFor.ts:25

enumerable

readonly enumerable: boolean

Whether or not it is an enumerable.

Defined in

queries/QueryFor.ts:36

modelType

readonly modelType: Constructor

Type of model, if an enumerable, this is the instance type.

Defined in

queries/QueryFor.ts:36

paging

paging: Paging

Gets the paging for the query.

Implementation of

IQueryFor.paging

Defined in

queries/QueryFor.ts:28

route

abstract readonly route: string

Implementation of

IQueryFor.route

Defined in

queries/QueryFor.ts:22

routeTemplate

abstract readonly routeTemplate: TemplateDelegate

Implementation of

IQueryFor.routeTemplate

Defined in

queries/QueryFor.ts:23

sorting

sorting: Sorting

Gets the sorting for the query.

Implementation of

IQueryFor.sorting

Defined in

queries/QueryFor.ts:27

Accessors

requiredRequestArguments
Get Signature

get abstract requiredRequestArguments(): string[]

Returns

string[]

Implementation of

IQueryFor.requiredRequestArguments

Defined in

queries/QueryFor.ts:24

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

Implementation of

IQueryFor.perform

Defined in

queries/QueryFor.ts:54

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

Implementation of

IQueryFor.setApiBasePath

Defined in

queries/QueryFor.ts:49

setMicroservice()

setMicroservice(microservice): void

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

void

Implementation of

IQueryFor.setMicroservice

Defined in

queries/QueryFor.ts:44