Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
LINQ-to-SQL 在 C# 中工作是因为编译器“魔术”允许表达式树和匿名函数使用相同的语法。如果users在IQueryable此处,users.Where(u => u.UserId == 1)则编译器将创建一个表达式树并最终将其传递给查询生成器。在没有编译器帮助的 Scala 中如何实现类似的功能?
users
IQueryable
users.Where(u => u.UserId == 1)
Slick是官方的类型安全工具,可以满足您的需求
自 Scala 2.10 以来,编译器提供了 帮助。
与 LINQ-to-SQL 最接近的类似物是SLICK。