ApexCountQueryBuilder
Generated API reference for ApexCountQueryBuilder in @kysoql/core.
@kysoql/core / ApexCountQueryBuilder
Apex rendering wrapper for a COUNT() query.
Type Parameters
| Type Parameter | Default type |
|---|---|
DB | - |
TB extends keyof DB | - |
Context extends ApexQueryContext | "static" |
Methods
$call()
$call<T>(func): T;Passes this builder to func and returns the callback result.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
func | (qb) => T |
Returns
T
$if()
$if(condition, func): this;Conditionally applies a builder callback; when false, the runtime query is unchanged.
Parameters
| Parameter | Type |
|---|---|
condition | boolean |
func | (qb) => this |
Returns
this
clearLimit()
clearLimit(): ApexCountQueryBuilder<DB, TB, Context>;Returns a builder with the LIMIT clause removed.
Returns
ApexCountQueryBuilder<DB, TB, Context>
clearWhere()
clearWhere(): ApexCountQueryBuilder<DB, TB, Context>;Returns a builder with the WHERE predicate removed.
Returns
ApexCountQueryBuilder<DB, TB, Context>
compile()
compile(): CompiledQuery<number>;Compiles the current operation tree into a CompiledQuery.
Returns
CompiledQuery<number>
allRows()
allRows(): ApexCountQueryBuilder<DB, TB, Context>;Adds the Apex ALL ROWS clause.
Returns
ApexCountQueryBuilder<DB, TB, Context>
limit()
limit(limit): ApexCountQueryBuilder<DB, TB, Context>;Adds or replaces the SOQL LIMIT clause.
Parameters
| Parameter | Type |
|---|---|
limit | number | ApexBindExpression<number> |
Returns
ApexCountQueryBuilder<DB, TB, Context>
where()
Call Signature
where(expression): ApexCountQueryBuilder<DB, TB, Context>;Adds a typed WHERE predicate and combines it with any existing predicate using AND.
Parameters
| Parameter | Type |
|---|---|
expression | SoqlRawBuilder |
Returns
ApexCountQueryBuilder<DB, TB, Context>
Call Signature
where(expression): ApexCountQueryBuilder<DB, TB, Context>;Adds a typed WHERE predicate and combines it with any existing predicate using AND.
Parameters
| Parameter | Type |
|---|---|
expression | ApexWhereExpressionFactory<DB, TB> |
Returns
ApexCountQueryBuilder<DB, TB, Context>
Call Signature
where(
lhs,
op,
rhs
): ApexCountQueryBuilder<DB, TB, Context>;Adds a typed WHERE predicate and combines it with any existing predicate using AND.
Parameters
| Parameter | Type |
|---|---|
lhs | ApexBindExpression<string> |
op | "includes" |
rhs | readonly string[] |
Returns
ApexCountQueryBuilder<DB, TB, Context>
Call Signature
where<RE, OP>(
lhs,
op,
rhs
): ApexCountQueryBuilder<DB, TB, Context>;Adds a typed WHERE predicate and combines it with any existing predicate using AND.
Type Parameters
| Type Parameter |
|---|
RE extends string |
OP extends | "=" | "!=" | OrderedComparisonOperator | "in" | "not in" | MultiSelectComparisonOperator | "like" |
Parameters
| Parameter | Type |
|---|---|
lhs | RE extends FilterableFieldName<DB, TB, RE> ? RE : never |
op | OP |
rhs | ApexOperandValueExpression<DB, TB, NoInfer<RE>, NoInfer<OP>> |
Returns
ApexCountQueryBuilder<DB, TB, Context>
setOptions()
setOptions(options): ApexCountQueryBuilder<DB, TB, Context>;Adds dynamic Apex SET OPTIONS from a bound Database.QueryOptions variable.
Parameters
| Parameter | Type |
|---|---|
options | DynamicApexOnly<Context, ApexBindExpression<ApexDatabaseQueryOptions>> |
Returns
ApexCountQueryBuilder<DB, TB, Context>
withSystemMode()
withSystemMode(): ApexCountQueryBuilder<DB, TB, Context>;Compiles the Apex query with WITH SYSTEM_MODE.
Returns
ApexCountQueryBuilder<DB, TB, Context>
withUserMode()
withUserMode(): ApexCountQueryBuilder<DB, TB, Context>;Compiles the Apex query with WITH USER_MODE.
Returns
ApexCountQueryBuilder<DB, TB, Context>
toOperationNode()
toOperationNode(): SelectQueryNode;Returns the immutable operation node represented by this builder.