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
requiredRequestArguments
readonly
requiredRequestArguments:string
[]
Defined in
route
readonly
route:string
Defined in
routeTemplate
readonly
routeTemplate:TemplateDelegate
Defined in
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
paging
Get Signature
get paging():
Paging
Gets the paging for the query.
Returns
Set Signature
set paging(
value
):void
Sets the paging for the query.
Parameters
value
Returns
void
Inherited from
Defined in
sorting
Get Signature
get sorting():
Sorting
Gets the sorting for the query.
Returns
Set Signature
set sorting(
value
):void
Sets the sorting for the query.
Parameters
value
Returns
void
Inherited from
Defined in
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
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
Defined in
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