Skip to content

Instance Method

having(_:_:column:)

Adds a column to column comparison to this builder’s HAVING clause by ANDing.
@discardableResult func having(_ lhs: SQLIdentifier, _ op: SQLBinaryOperator, column rhs: SQLIdentifier) -> Self

Discussion

builder.having("firstName", .equal, column: "lastName")

This method compares two columns.

SELECT * FROM "users" HAVING "firstName" = "lastName"