removeHaving method

Sqler removeHaving(
  1. Having having
)

Removes a specific HAVING condition from the query by comparing SQL output.

having The HAVING condition to remove. Returns this to enable method chaining.

Example:

query.removeHaving(Having([Condition(QField('COUNT(*)'), QO.GT, QVar(5))])); // Removes this HAVING condition

Implementation

Sqler removeHaving(Having having) {
  _having.removeWhere((e) => e.toSQL() == having.toSQL());
  return this;
}