HavingGroupBuilder

Having group builder for configuring the logical relationship (AND/OR) of a condition group.

Properties

Methods

constructor

Definition:

constructor(yMap: Y.Map<any>)

Parameters:

ParameterTypeDescription
yMapY.Map-

getConditions

Definition:

getConditions(): Y.Array<any>

Returns: Y.Array<any>

getId

Gets the group ID.

Definition:

getId(): string

Returns: string

getOperator

Gets the logical operator.

Definition:

getOperator(): 'and' | 'or'

Returns: 'and' \| 'or'

setOperator

Sets the logical operator.

Definition:

setOperator(op: 'and' | 'or'): this

Returns: this

Parameters:

ParameterTypeDescription
op'and' | 'or'- Logical operator

add

Adds a Having filter condition to the group.

Definition:

add(field: string, callback: (node: HavingFilterNodeBuilder) => void): this

Returns: this

Parameters:

ParameterTypeDescription
fieldstring- Field name
callback(node: HavingFilterNodeBuilder) => void- Callback function

addGroup

Adds a nested group to the current group.

Definition:

addGroup(op: 'and' | 'or', callback: (group: HavingGroupBuilder) => void): this

Returns: this

Parameters:

ParameterTypeDescription
op'and' | 'or'- Logical operator
callback(group: HavingGroupBuilder) => void- Callback function

remove

Removes the condition with the specified ID or the item at the specified index.

Definition:

remove(idOrIndex: string | number): this

Returns: this

Parameters:

ParameterTypeDescription
idOrIndexstring | number- ID or index

clear

Clears all conditions in the group.

Definition:

clear(): this

Returns: this

toJSON

Exports to JSON.

Definition:

toJSON(): VBIHavingGroup

Returns: VBIHavingGroup