( having: Having, )
| 272 | * HAVING clauses can contain aggregates, unlike regular WHERE clauses |
| 273 | */ |
| 274 | export function getHavingExpression( |
| 275 | having: Having, |
| 276 | ): BasicExpression | Aggregate { |
| 277 | return typeof having === `object` && `expression` in having |
| 278 | ? having.expression |
| 279 | : having |
| 280 | } |
| 281 | |
| 282 | /** |
| 283 | * Check if a Where clause is marked as residual |