问题标签 [slick-2.0]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
50 浏览

scala - 四个不同的函数,不同的返回类型,相同的错误

我正在学习scala和slick。我得到了这样的错误:

我不确定是什么foundrequired代表什么。所以我添加了其他功能:

并期待不同的foundand required,但同样的错误出现了:

为什么会出现同样的错误?发现和要求代表什么?谢谢。

0 投票
2 回答
426 浏览

scala - SLICK:如何在另一个查询中使用查询结果?

我想执行以下操作:

我想返回一个用户列表,首先按用户“关注”的人排序,其次是一些额外的分数。但是,我在下面编写的以下代码不起作用,因为资助者是提升的 Slick 类型,因此从未在列表中找到。

所有帮助表示赞赏!

0 投票
1 回答
523 浏览

scala - 有了新的 Scala 2.11.0,我们还需要使用 Slick HList 来克服数量限制吗?

好消息,Scala 2.11.0 版本已经发布。他们最终修复了案例类的数量限制 <22 http://www.scala-lang.org/news/2014/04/21/release-notes-2.11.0.html

我的问题与 slick orm 有关。我们还必须使用 HList 来克服数量限制吗?

0 投票
1 回答
1081 浏览

scala - 如何在 Slick 2.0 中从 List[String] 映射到 String?

因为 MySQL 数据库不支持数组,所以我想将类似List("facebook","linkedin","local")字符串的列表映射到类似"facebook, linkedin, local".

我想用 slick 2.0 进行双向映射,但我不知道如何编写TypeMapper.

谁能给我举个例子?

0 投票
1 回答
449 浏览

scala - 需要一个与 slick 一起使用的 play2-elasticsearch 模块的示例

我想在我使用 slick2.0 进行数据库交互的游戏项目中使用https://github.com/cleverage/play2-elasticsearch 。但不幸的是,我找不到任何可以帮助我入门的适当文档或示例。

0 投票
1 回答
669 浏览

forms - How to make the Form mapping multi data-models in playframework?

I use playframework 2.2+slick 2:

my datamodel:

I have a form to fill both user information and his address information. I do not know how to mapping them:(of course here is fake code)

How to mapping a Form to multi-data-models here? Can you give this case an example?

0 投票
1 回答
1689 浏览

postgresql - Slick 2.0 Generic CRUD operations

I've been looking around on how to implement a generic trait for commons CRUD and other kinds of operations, I looked at this and this and the method specified are working well.

What I would like to have is a generic method for insertion, my class looks like this at the moment (non generic implementation):

What I tried so far, following the first link, was this (generic implementation):

When I inspect the insert method it looks like the right type should be T#TableElementType but my knowledge is pretty basic and I can't wrap my head around types, I tried T and A and the compiler says that the classtype does not conform to the trait one's.

Other infos, the tables are generated with the slick table generation tools

0 投票
1 回答
457 浏览

scala - [Slick 2.0]:如何将子查询从 sql 转换为 Slick

我有以下(mysql)SQL查询:

这基本上显示了所有由女性主导的领域。

我将如何将其转换为流畅的语法?

从网站上的示例中,我不确定如何使用具有相关性的子查询。

0 投票
1 回答
1460 浏览

scala - 如何在 Slick 中将 Option[String] 与可为空的列进行比较?

我的数据库中有一个可以为空的列,我正在执行这种比较:

但是我没有得到预期的结果,空列应该匹配 None 并且填充的列应该匹配字符串(如果相等)

0 投票
1 回答
2185 浏览

scala - Scala Slick 2 加入多个领域?

如何在下面的示例中连接多个字段?

如何使用 Slick 2.0.1 实现这一目标?Idelly 我需要 slick 来生成这种查询

请注意ON x3."id" = x2."type_id" AND x2.owner_id = 16