@@ -71,6 +71,7 @@ instance DBType Bool where
71 { encode = Opaleye.ConstExpr . Opaleye.BoolLit
71 { encode = Opaleye.ConstExpr . Opaleye.BoolLit
72 , decode = Hasql.bool
72 , decode = Hasql.bool
73 , typeName = "bool"
73 , typeName = "bool"
@@ -79,6 +80,7 @@ instance DBType Char where
79 { encode = Opaleye.ConstExpr . Opaleye.StringLit . pure
80 { encode = Opaleye.ConstExpr . Opaleye.StringLit . pure
80 , decode = Hasql.char
81 , decode = Hasql.char
81 , typeName = "char"
82 , typeName = "char"
@@ -87,6 +89,7 @@ instance DBType Int16 where
87 { encode = Opaleye.ConstExpr . Opaleye.IntegerLit . toInteger
89 { encode = Opaleye.ConstExpr . Opaleye.IntegerLit . toInteger
88 , decode = Hasql.int2
90 , decode = Hasql.int2
89 , typeName = "int2"
91 , typeName = "int2"
@@ -95,6 +98,7 @@ instance DBType Int32 where
95 { encode = Opaleye.ConstExpr . Opaleye.IntegerLit . toInteger
98 { encode = Opaleye.ConstExpr . Opaleye.IntegerLit . toInteger
96 , decode = Hasql.int4
99 , decode = Hasql.int4
97 , typeName = "int4"
100 , typeName = "int4"
@@ -103,6 +107,7 @@ instance DBType Int64 where
103 { encode = Opaleye.ConstExpr . Opaleye.IntegerLit . toInteger
107 { encode = Opaleye.ConstExpr . Opaleye.IntegerLit . toInteger
104 , decode = Hasql.int8
108 , decode = Hasql.int8
105 , typeName = "int8"
109 , typeName = "int8"
@@ -111,6 +116,7 @@ instance DBType Float where
111 { encode = Opaleye.ConstExpr . Opaleye.NumericLit . realToFrac
116 { encode = Opaleye.ConstExpr . Opaleye.NumericLit . realToFrac
112 , decode = Hasql.float4
117 , decode = Hasql.float4
113 , typeName = "float4"
118 , typeName = "float4"
@@ -119,6 +125,7 @@ instance DBType Double where
119 { encode = Opaleye.ConstExpr . Opaleye.NumericLit . realToFrac
125 { encode = Opaleye.ConstExpr . Opaleye.NumericLit . realToFrac
120 , decode = Hasql.float8
126 , decode = Hasql.float8
121 , typeName = "float8"
127 , typeName = "float8"
@@ -127,6 +134,7 @@ instance DBType Scientific where
127 { encode = Opaleye.ConstExpr . Opaleye.NumericLit
134 { encode = Opaleye.ConstExpr . Opaleye.NumericLit
128 , decode = Hasql.numeric
135 , decode = Hasql.numeric
129 , typeName = "numeric"
136 , typeName = "numeric"
@@ -137,6 +145,7 @@ instance DBType UTCTime where
137 formatTime defaultTimeLocale "'%FT%T%QZ'"
145 formatTime defaultTimeLocale "'%FT%T%QZ'"
138 , decode = Hasql.timestamptz
146 , decode = Hasql.timestamptz
139 , typeName = "timestamptz"
147 , typeName = "timestamptz"
@@ -147,6 +156,7 @@ instance DBType Day where
147 formatTime defaultTimeLocale "'%F'"
156 formatTime defaultTimeLocale "'%F'"
148 , decode = Hasql.date
157 , decode = Hasql.date
149 , typeName = "date"
158 , typeName = "date"
@@ -157,6 +167,7 @@ instance DBType LocalTime where
157 formatTime defaultTimeLocale "'%FT%T%Q'"
167 formatTime defaultTimeLocale "'%FT%T%Q'"
158 , decode = Hasql.timestamp
168 , decode = Hasql.timestamp
159 , typeName = "timestamp"
169 , typeName = "timestamp"
@@ -167,6 +178,7 @@ instance DBType TimeOfDay where
167 formatTime defaultTimeLocale "'%T%Q'"
178 formatTime defaultTimeLocale "'%T%Q'"
168 , decode = Hasql.time
179 , decode = Hasql.time
169 , typeName = "time"
180 , typeName = "time"
@@ -177,6 +189,7 @@ instance DBType DiffTime where
177 formatTime defaultTimeLocale "'%-6Es'"
189 formatTime defaultTimeLocale "'%-6Es'"
178 , decode = Hasql.interval
190 , decode = Hasql.interval
179 , typeName = "interval"
191 , typeName = "interval"
@@ -190,6 +203,7 @@ instance DBType Text where
190 { encode = Opaleye.ConstExpr . Opaleye.StringLit . Text.unpack
203 { encode = Opaleye.ConstExpr . Opaleye.StringLit . Text.unpack
191 , decode = Hasql.text
204 , decode = Hasql.text
192 , typeName = "text"
205 , typeName = "text"
@@ -215,6 +229,7 @@ instance DBType ByteString where
215 { encode = Opaleye.ConstExpr . Opaleye.ByteStringLit
229 { encode = Opaleye.ConstExpr . Opaleye.ByteStringLit
216 , decode = Hasql.bytea
230 , decode = Hasql.bytea
217 , typeName = "bytea"
231 , typeName = "bytea"
@@ -229,6 +244,7 @@ instance DBType UUID where
229 { encode = Opaleye.ConstExpr . Opaleye.StringLit . UUID.toString
244 { encode = Opaleye.ConstExpr . Opaleye.StringLit . UUID.toString
230 , decode = Hasql.uuid
245 , decode = Hasql.uuid
231 , typeName = "uuid"
246 , typeName = "uuid"
@@ -240,6 +256,7 @@ instance DBType Value where
240 Lazy.unpack . Lazy.decodeUtf8 . Aeson.encode
256 Lazy.unpack . Lazy.decodeUtf8 . Aeson.encode
241 , decode = Hasql.jsonb
257 , decode = Hasql.jsonb
242 , typeName = "jsonb"
258 , typeName = "jsonb"