scala - How to return compound types in Slick's Case-If-Then-Else -



scala - How to return compound types in Slick's Case-If-Then-Else -

i start dipping toe slick.

in coffee-supplier example, seek "case if else" this:

val q = coffees.withfilter(_.price > 9.0).flatmap({ c => suppliers.withfilter(_.id == c.supid).map({ s => val t = c.name > s.name case if t { (c.name, s.name) } else { (s.name, c.name) } }) })

the compiler emits error:

could not find implicit value evidence parameter of type scala.slick.ast.typedtype[(scala.slick.lifted.column[string], scala.slick.lifted.column[string])] case if t { (c.name, s.name) } else { (s.name, c.name) } ^

much same error apears other compound types list well. guess i'm on own define implicit type in question i'm not sure start.

currently not support, created ticket: https://github.com/slick/slick/issues/866

workaround: write individual if constructs each scalar value

scala slick

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -