@wearesage/schema
Preparing search index...
IQueryBuilder
Interface IQueryBuilder<T>
interface
IQueryBuilder
<
T
>
{
addAsyncCondition
(
condition
:
AsyncConditionFunction
<
T
>
)
:
void
;
addCondition
(
condition
:
QueryCondition
)
:
void
;
and
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
;
andAsync
(
condition
:
AsyncConditionFunction
<
T
>
)
:
IQueryBuilder
<
T
>
;
count
()
:
Promise
<
number
>
;
describeProperty
(
property
:
keyof
T
)
:
PropertyMetadata
;
describeRelationship
(
relationship
:
string
)
:
RelationshipMetadata
;
execute
()
:
Promise
<
QueryResult
<
T
>
>
;
exists
()
:
Promise
<
boolean
>
;
first
()
:
Promise
<
T
>
;
getAsyncConditions
()
:
AsyncConditionFunction
<
T
>
[]
;
getAvailableOperators
()
:
QueryOperator
[]
;
getAvailableProperties
()
:
(
keyof
T
)
[]
;
getAvailableRelationships
()
:
string
[]
;
getConditions
()
:
QueryCondition
[]
;
getIncludes
()
:
QueryInclude
[]
;
getLimit
()
:
number
;
getOffset
()
:
number
;
getSorts
()
:
QuerySort
[]
;
include
(
relationship
:
string
)
:
IQueryBuilder
<
T
>
;
includeNested
(
relationship
:
string
,
nested
:
QueryInclude
[]
,
)
:
IQueryBuilder
<
T
>
;
limit
(
count
:
number
)
:
IQueryBuilder
<
T
>
;
not
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
;
offset
(
count
:
number
)
:
IQueryBuilder
<
T
>
;
or
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
;
orAsync
(
condition
:
AsyncConditionFunction
<
T
>
)
:
IQueryBuilder
<
T
>
;
orderBy
(
property
:
keyof
T
,
direction
?:
"desc"
|
"asc"
)
:
IQueryBuilder
<
T
>
;
where
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
;
whereAsync
(
condition
:
AsyncConditionFunction
<
T
>
)
:
IQueryBuilder
<
T
>
;
}
Type Parameters
T
Implemented by
QueryBuilder
Index
Methods
add
Async
Condition
add
Condition
and
and
Async
count
describe
Property
describe
Relationship
execute
exists
first
get
Async
Conditions
get
Available
Operators
get
Available
Properties
get
Available
Relationships
get
Conditions
get
Includes
get
Limit
get
Offset
get
Sorts
include
include
Nested
limit
not
offset
or
or
Async
order
By
where
where
Async
Methods
add
Async
Condition
addAsyncCondition
(
condition
:
AsyncConditionFunction
<
T
>
)
:
void
Parameters
condition
:
AsyncConditionFunction
<
T
>
Returns
void
add
Condition
addCondition
(
condition
:
QueryCondition
)
:
void
Parameters
condition
:
QueryCondition
Returns
void
and
and
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
Parameters
property
:
keyof
T
Returns
IQueryConditionBuilder
<
T
>
and
Async
andAsync
(
condition
:
AsyncConditionFunction
<
T
>
)
:
IQueryBuilder
<
T
>
Parameters
condition
:
AsyncConditionFunction
<
T
>
Returns
IQueryBuilder
<
T
>
count
count
()
:
Promise
<
number
>
Returns
Promise
<
number
>
describe
Property
describeProperty
(
property
:
keyof
T
)
:
PropertyMetadata
Parameters
property
:
keyof
T
Returns
PropertyMetadata
describe
Relationship
describeRelationship
(
relationship
:
string
)
:
RelationshipMetadata
Parameters
relationship
:
string
Returns
RelationshipMetadata
execute
execute
()
:
Promise
<
QueryResult
<
T
>
>
Returns
Promise
<
QueryResult
<
T
>
>
exists
exists
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
first
first
()
:
Promise
<
T
>
Returns
Promise
<
T
>
get
Async
Conditions
getAsyncConditions
()
:
AsyncConditionFunction
<
T
>
[]
Returns
AsyncConditionFunction
<
T
>
[]
get
Available
Operators
getAvailableOperators
()
:
QueryOperator
[]
Returns
QueryOperator
[]
get
Available
Properties
getAvailableProperties
()
:
(
keyof
T
)
[]
Returns (
keyof
T
)
[]
get
Available
Relationships
getAvailableRelationships
()
:
string
[]
Returns
string
[]
get
Conditions
getConditions
()
:
QueryCondition
[]
Returns
QueryCondition
[]
get
Includes
getIncludes
()
:
QueryInclude
[]
Returns
QueryInclude
[]
get
Limit
getLimit
()
:
number
Returns
number
get
Offset
getOffset
()
:
number
Returns
number
get
Sorts
getSorts
()
:
QuerySort
[]
Returns
QuerySort
[]
include
include
(
relationship
:
string
)
:
IQueryBuilder
<
T
>
Parameters
relationship
:
string
Returns
IQueryBuilder
<
T
>
include
Nested
includeNested
(
relationship
:
string
,
nested
:
QueryInclude
[]
)
:
IQueryBuilder
<
T
>
Parameters
relationship
:
string
nested
:
QueryInclude
[]
Returns
IQueryBuilder
<
T
>
limit
limit
(
count
:
number
)
:
IQueryBuilder
<
T
>
Parameters
count
:
number
Returns
IQueryBuilder
<
T
>
not
not
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
Parameters
property
:
keyof
T
Returns
IQueryConditionBuilder
<
T
>
offset
offset
(
count
:
number
)
:
IQueryBuilder
<
T
>
Parameters
count
:
number
Returns
IQueryBuilder
<
T
>
or
or
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
Parameters
property
:
keyof
T
Returns
IQueryConditionBuilder
<
T
>
or
Async
orAsync
(
condition
:
AsyncConditionFunction
<
T
>
)
:
IQueryBuilder
<
T
>
Parameters
condition
:
AsyncConditionFunction
<
T
>
Returns
IQueryBuilder
<
T
>
order
By
orderBy
(
property
:
keyof
T
,
direction
?:
"desc"
|
"asc"
)
:
IQueryBuilder
<
T
>
Parameters
property
:
keyof
T
Optional
direction
:
"desc"
|
"asc"
Returns
IQueryBuilder
<
T
>
where
where
(
property
:
keyof
T
)
:
IQueryConditionBuilder
<
T
>
Parameters
property
:
keyof
T
Returns
IQueryConditionBuilder
<
T
>
where
Async
whereAsync
(
condition
:
AsyncConditionFunction
<
T
>
)
:
IQueryBuilder
<
T
>
Parameters
condition
:
AsyncConditionFunction
<
T
>
Returns
IQueryBuilder
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
add
Async
Condition
add
Condition
and
and
Async
count
describe
Property
describe
Relationship
execute
exists
first
get
Async
Conditions
get
Available
Operators
get
Available
Properties
get
Available
Relationships
get
Conditions
get
Includes
get
Limit
get
Offset
get
Sorts
include
include
Nested
limit
not
offset
or
or
Async
order
By
where
where
Async
@wearesage/schema
Loading...