Skip to content

Commit 1f635d3

Browse files
committed
Allow custom binary operators
1 parent dffb708 commit 1f635d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/PostgreSQL/SQL/PostgreSQLBinaryOperator.swift

+4
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ public enum PostgreSQLBinaryOperator: SQLBinaryOperator, Equatable {
151151
/// `NOT ILIKE`
152152
case notILike
153153

154+
/// Custom operator
155+
case custom(String)
156+
154157
/// See `SQLSerializable`.
155158
public func serialize(_ binds: inout [Encodable]) -> String {
156159
switch self {
@@ -186,6 +189,7 @@ public enum PostgreSQLBinaryOperator: SQLBinaryOperator, Equatable {
186189
case ._notRegexp: return "NOT REGEXP"
187190
case .ilike: return "ILIKE"
188191
case .notILike: return "NOT ILIKE"
192+
case .custom(let op): return op
189193
}
190194
}
191195
}

0 commit comments

Comments
 (0)