scalaquery

How to use ScalaQuery to build a query for count(*) sql?

When I programming with the ScalaQuery, how to build a "select count(*) from table" statement? I used a Query(TestTable.count) but the generated select statement is: select count(*) from (select column1 from TestTable t2) t1 I want the: select count(*) from TestTable sorry for my poor english. import org.scalaque...

How to use ScalaQuery to insert a BLOB field?

I used ScalaQuery and Scala. If I have an Array[Byte] object, how do I insert it into the table? object TestTable extends BasicTable[Test]("test") { def id = column[Long]("mid", O.NotNull) def extInfo = column[Blob]("mbody", O.Nullable) def * = id ~ extInfo <> (Test, Test.unapply _) } case class Test(id: Long, extInfo: Blob) ...