We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6266940 commit 970ae9bCopy full SHA for 970ae9b
Sources/PostgreSQL/SQL/PostgreSQLQuery+DataType.swift
@@ -1,4 +1,12 @@
1
-public struct PostgreSQLDataType: SQLDataType {
+public struct PostgreSQLDataType: SQLDataType, Equatable {
2
+ /// See `Equatable`.
3
+ public static func == (lhs: PostgreSQLDataType, rhs: PostgreSQLDataType) -> Bool {
4
+ // FIXME: more performant equatable is possible
5
+ var binds: [Encodable] = []
6
+ return lhs.serialize(&binds) == rhs.serialize(&binds)
7
+ }
8
+
9
+ /// See `SQLDataType`.
10
public static func dataType(appropriateFor type: Any.Type) -> PostgreSQLDataType? {
11
guard let type = type as? PostgreSQLDataTypeStaticRepresentable.Type else {
12
return .jsonb
0 commit comments