scalaquery

    8熱度

    5回答

    我想根據ID從用戶查詢單行。我有以下虛設碼 case class User( id: Option[Int], name: String } object Users extends Table[User]("user") { def id = column[Int]("id", O.PrimaryKey, O.AutoInc) def name = c

    23熱度

    1回答

    也許是一個愚蠢的問題。但到目前爲止我還沒有找到答案。那麼如何在SLICK中表示SQL的「LIKE」運算符?

    16熱度

    1回答

    我想篩選可選日期列與斯卡拉油滑1.0.1。 這可能是我沒有看到它,但我有一個表,看起來是這樣的: case class UserRole(id:UUID, userID:UUID, role:String) object UserRole extends Table[UserRole]("User_Role") { //(id: Long = 0l, name: String, ac

    1熱度

    1回答

    我正在將play2.0應用遷移到play2.1,其中有很多scalaquery實現。所有遷移改變其最終編譯(不使用anorm)時,scalaqueries仍然存在。 發揮編譯階段是成功的,但它給予以下錯誤 java.lang.NoClassDefFoundError: scala/Right org.scalaquery.ql.basic.BasicImplicitConversions$cl

    9熱度

    1回答

    我想生產這種SQL用油滑1.0.0: select cat.categoryId, cat.title, ( select count(product.productId) from products product right join products_categories productCategory

    3熱度

    1回答

    出於某種原因,就我而言,即使是簡單的光滑表格聲明也不起作用。我使用的是來自maven中央倉庫的最新版本2.10(1.0.0)。 case class DeviceType(id: Option[Int] = None, name: String, version: String) object DeviceTypes extends Table[DeviceType]("device_type

    26熱度

    1回答

    如何使聚合我想迫使光滑像 select max(price) from coffees where ... 但slick's documentation創建查詢不利於 val q = Coffees.map(_.price) //this is query Query[Coffees.type, ...] val q1 = q.min // this is Column[Option[Dou

    0熱度

    1回答

    做我的第一個步驟,用油滑,我有這個表 case class Employee(name: String,last: String,department: Option[Int] = None,id: Option[Int] = None) class Employees (tag: Tag) extends Table[Employee](tag, "EMPLOYEES") { //

    1熱度

    1回答

    我在一個庫中的以下: 案例類: case class Foo( id: Option[Long], bar: Long ... ) 表: object Foos extends Mapper[Foo]("foo"){ //I'm using slick-inegration so the id is free def bar = column[Long]("ba

    0熱度

    1回答

    我想用命名的引用,而不是位置的調用getResult,所以,與其這樣: implicit val getCoffeeResult = GetResult(r => Coffee(r.<<, r.<<, r.<<)) 我可以寫這樣的事情: implicit val getCoffeeResult = GetResult(r => Coffee(r.get("name"), r.get("supI