You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is, it first reads fa, and then ff. This leads to surprising results when manually building a Read instance:
scala> val read = (Read[Int], Read[String]).tupled
read: doobie.util.Read[(Int, String)] = doobie.util.Read@4fb0497f
scala> val query = sql"select 1, 'foo'".query(read)
query: doobie.Query0[(Int, String)] = doobie.util.query$Query$$anon$3@419a4cd0
scala> query.check.unsafeRunSync
Query0[(Int, String)] defined at <console>:50
select 1, 'foo'
✓ SQL Compiles and TypeChecks
✕ C01 ?column? INTEGER (int4) NULL? → String
INTEGER (int4) is ostensibly coercible to String according to the
JDBC specification but is not a recommended target type. Expected
schema type was CHAR or VARCHAR or LONGVARCHAR or NCHAR or
NVARCHAR or LONGNVARCHAR.
✕ C02 ?column? VARCHAR (text) NULL? → Int
VARCHAR (text) is ostensibly coercible to Int according to the
JDBC specification but is not a recommended target type. Expected
schema type was INTEGER.
The text was updated successfully, but these errors were encountered:
nigredo-tori
changed the title
Apply[Read].ap reads the arguments in the wrong order
Apply[Read].ap reads the columns in the wrong order
Apr 1, 2019
Currently
Apply[Read].ap
is implemented like this:That is, it first reads
fa
, and thenff
. This leads to surprising results when manually building aRead
instance:The text was updated successfully, but these errors were encountered: