When trying to use scalaquery to retrieve the length of a text column in a SQLite database it generates the wrong SQL. I get this:
SELECT "t1"."title" FROM "GoodPages" "t1" WHERE ({fn length("t1"."title")} > 65)
when the query should really be
SELECT "t1"."title" FROM "GoodPages" "t1" WHERE length("t1"."title") > 65
The for
comp I use for getting this query is
for (f <- Foo if f.title.length > 65) yield f.title
And the Table def I have is
object Foo extends Table[(Int,String)]("Foo") {
def id = column[Int]("id")
def title = column[String]("title")
def * = id ~ title
}
It seems like scalaquery is just generating the wrong length()
function, but I can't find where in the code this happens nor have I found anything on the Internet about this.