所以我有这样的SQL(一个更大的查询的一部分): from Person p left join ForeignCredentials fc on fc.person_id = p.id and fc.type = 'FACEBOOK'
,我试图代表这scalalikejdbc这样的: select.from(Person as p).leftJoin(ForeignCredential as
我输入几行上Single/Optional Result for Query @ ScalikeJDBC Docs: package org.mysample
import scalikejdbc._
// define a class to map the result
case class Emp(id: String, name: String)
// QueryDSL
ob
我有一段时间使用我的ScalaTest测试用例的测试数据库,如documentation examples所示。 我有一个默认的数据库,并且数据库testdb的,和我的规格看起来像 class JobSpec extends FlatSpec with AutoRollback {
DBsWithEnv("test").setup('testdb)
override def d
我可以在子句使用带有ScalikeJDBC的SQL插值?例如 val ids = Set(1,2,3,5)
sql"""update foo set bar=${bar} where id in ${ids}""".update().apply()
由于ids未被内插,因此失败。 sql"""update foo set bar=${bar} where id in (${ids.mkStr