Documentation / queries/QueryResultWithState
queries/QueryResultWithState
Classes
QueryResultWithState<TDataType>
Represents a specialized <TDataType> that holds state for its execution
Type Parameters
• TDataType
Implements
IQueryResult
<TDataType
>
Constructors
new QueryResultWithState()
new QueryResultWithState<
TDataType
>(data
,paging
,isSuccess
,isAuthorized
,isValid
,validationResults
,hasExceptions
,exceptionMessages
,exceptionStackTrace
,isPerforming
):QueryResultWithState
<TDataType
>
Initializes an instance of <TDataType>.
Parameters
data
TDataType
The items returned, if any - can be empty.
paging
The paging info.
isSuccess
boolean
Whether or not the query was successful.
isAuthorized
boolean
Whether or not the query was authorized.
isValid
boolean
Whether or not it is valid.
validationResults
Any validation errors.
hasExceptions
boolean
Whether or not it has exceptions.
exceptionMessages
string
[]
Any exception messages.
exceptionStackTrace
string
Exception stack trace, if any.
isPerforming
boolean
Whether or not the query is being performed. True if its performing, false if it is done.
Returns
QueryResultWithState
<TDataType
>
Defined in
queries/QueryResultWithState.ts:55
Properties
data
readonly
data:TDataType
The items returned, if any - can be empty.
Implementation of
Defined in
queries/QueryResultWithState.ts:56
exceptionMessages
readonly
exceptionMessages:string
[]
Any exception messages.
Implementation of
IQueryResult
.exceptionMessages
Defined in
queries/QueryResultWithState.ts:63
exceptionStackTrace
readonly
exceptionStackTrace:string
Exception stack trace, if any.
Implementation of
IQueryResult
.exceptionStackTrace
Defined in
queries/QueryResultWithState.ts:64
hasExceptions
readonly
hasExceptions:boolean
Whether or not it has exceptions.
Implementation of
Defined in
queries/QueryResultWithState.ts:62
isAuthorized
readonly
isAuthorized:boolean
Whether or not the query was authorized.
Implementation of
Defined in
queries/QueryResultWithState.ts:59
isPerforming
readonly
isPerforming:boolean
Whether or not the query is being performed. True if its performing, false if it is done.
Defined in
queries/QueryResultWithState.ts:65
isSuccess
readonly
isSuccess:boolean
Whether or not the query was successful.
Implementation of
Defined in
queries/QueryResultWithState.ts:58
isValid
readonly
isValid:boolean
Whether or not it is valid.
Implementation of
Defined in
queries/QueryResultWithState.ts:60
paging
readonly
paging:PagingInfo
The paging info.
Implementation of
Defined in
queries/QueryResultWithState.ts:57
validationResults
readonly
validationResults:ValidationResult
[]
Any validation errors.
Implementation of
IQueryResult
.validationResults
Defined in
queries/QueryResultWithState.ts:61
Accessors
hasData
Get Signature
get hasData():
boolean
Gets whether or not the query has data.
Returns
boolean
Gets whether or not the query has data.
Implementation of
Defined in
queries/QueryResultWithState.ts:69
Methods
empty()
static
empty<TDataType
>(defaultValue
):QueryResultWithState
<TDataType
>
Type Parameters
• TDataType
Parameters
defaultValue
TDataType
Returns
QueryResultWithState
<TDataType
>
Defined in
queries/QueryResultWithState.ts:14
fromQueryResult()
static
fromQueryResult<TDataType
>(queryResult
,isPerforming
):QueryResultWithState
<TDataType
>
Create a new <TDataType> from <TDataType>.
Type Parameters
• TDataType
Parameters
queryResult
QueryResult
<TDataType
>
The original query result.
isPerforming
boolean
Whether or not the query is performing.
Returns
QueryResultWithState
<TDataType
>
A new <TDataType>
Defined in
queries/QueryResultWithState.ts:82
initial()
static
initial<TDataType
>(defaultValue
):QueryResultWithState
<TDataType
>
Type Parameters
• TDataType
Parameters
defaultValue
TDataType
Returns
QueryResultWithState
<TDataType
>