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
// AnalysisSpeccaseclassFoo(bar: Long, baz: Int, shenanigans: Array[Byte] =Array[Byte]())
valq0=sql"""select f.bar, f.baz, f.shenanigans from Foo f""".query[Foo]
valq1=sql"""select f.bar, f.baz from Foo f""".query[Foo]
"Example" should {
"have typechecked queries" in {
checkOutput(q0)
checkOutput(q1)
}
}
q1 will not type check due to the default parameter for shenanigans:
[info] Example should
[info] have typechecked queries
[info] Query0[FooSpec.Foo] defined at FooSpec.scala:33
[info] select f.bar, f.baz, f.shenanigans from Foo f
[info] + SQL Compiles and Typechecks
[info] + C01 bar BIGINT (BIGINT) NOT NULL → Long
[info] + C02 baz INTEGER (INT) NOT NULL → Int
[info] + C03 shenanigans LONGVARBINARY (MEDIUMBLOB) NOT NULL → Array[Byte]
[info] Query0[FooSpec.Foo] defined at FooSpec.scala:34
[info] select f.bar, f.baz from Foo f
[info] + SQL Compiles and Typechecks
[info] + C01 bar BIGINT (BIGINT) NOT NULL → Long
[info] + C02 baz INTEGER (INT) NOT NULL → Int
[error] x C03 → Array[Byte]
[error] x Too few columns are selected, which will result in a runtime failure. Add a
[error] column or remove mapped Array[Byte] from the result type. (DoobieEventComponentSpec.scala:34)
@milessabin reports that shapeless 2.3.0 supports default parameters so this will hopefully be solved when the dependency is updated.
The text was updated successfully, but these errors were encountered:
Given:
q1
will not type check due to the default parameter forshenanigans
:@milessabin reports that shapeless 2.3.0 supports default parameters so this will hopefully be solved when the dependency is updated.
The text was updated successfully, but these errors were encountered: