@@ -74,6 +74,7 @@ data BuiltinType
77 deriving (Eq, Ord, Enum, Bounded, Read, Show, Typeable)
78 deriving (Eq, Ord, Enum, Bounded, Read, Show, Typeable)
79builtin2oid :: BuiltinType -> PQ.Oid
80builtin2oid :: BuiltinType -> PQ.Oid
@@ -125,6 +126,7 @@ builtin2oid typ = PQ.Oid $ case typ of
125 Void -> 2278
126 Void -> 2278
126 UUID -> 2950
127 UUID -> 2950
127 JSON -> 114
128 JSON -> 114
129oid2builtin :: PQ.Oid -> Maybe BuiltinType
131oid2builtin :: PQ.Oid -> Maybe BuiltinType
130oid2builtin (PQ.Oid x) = case x of
132oid2builtin (PQ.Oid x) = case x of
@@ -175,6 +177,7 @@ oid2builtin (PQ.Oid x) = case x of
175 2278 -> Just Void
177 2278 -> Just Void
176 2950 -> Just UUID
178 2950 -> Just UUID
177 114 -> Just JSON
179 114 -> Just JSON
178 _ -> Nothing
181 _ -> Nothing
180builtin2typname :: BuiltinType -> ByteString
183builtin2typname :: BuiltinType -> ByteString
@@ -226,6 +229,7 @@ builtin2typname typ = case typ of
226 Void -> void
229 Void -> void
227 UUID -> uuid
230 UUID -> uuid
228 JSON -> json
231 JSON -> json
230oid2typname :: PQ.Oid -> Maybe ByteString
234oid2typname :: PQ.Oid -> Maybe ByteString
231oid2typname (PQ.Oid x) = case x of
235oid2typname (PQ.Oid x) = case x of
@@ -276,6 +280,7 @@ oid2typname (PQ.Oid x) = case x of
276 2278 -> Just void
280 2278 -> Just void
277 2950 -> Just uuid
281 2950 -> Just uuid
278 114 -> Just json
282 114 -> Just json
279 _ -> Nothing
284 _ -> Nothing
281bool :: ByteString
286bool :: ByteString
@@ -418,3 +423,6 @@ uuid = "uuid"
419json :: ByteString
424json :: ByteString
420json = "json"
425json = "json"