使用 Slick 调用存储过程 [英] Calling stored procedures with Slick

查看:60
本文介绍了使用 Slick 调用存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 Slick 调用存储过程?

How do I use Slick to call a stored procedure?

我希望它是类型安全的/注入安全的.(即,我不希望我的代码中包含任何 SQL 查询字符串...)

I want it to be type safe / injection safe. (ie, I don't want any SQL query strings in my code...)

根据文档,Slick 包括存储过程的类型安全支持"(http://slick.typesafe.com/doc/1.0.0/introduction.html)

According to the docs, Slick includes "Type-safe support of stored procedures" (http://slick.typesafe.com/doc/1.0.0/introduction.html)

但是我在文档中没有看到任何关于如何操作的示例.

But I do not see any example in the docs of how to do it.

推荐答案

这是一个错字.它应该是标量数据库函数的类型安全支持".目前你必须使用普通的 SQL 来调用存储过程.

That's a typo. It should read "Type-safe support of scalar database functions". At the moment you have to use plain SQL to call stored procedures.

另请参阅https://groups.google.com/forum/#!searchin/scalaquery/procedure/scalaquery/BUB2-ryR0bY/EFZGX663tRYJ

这篇关于使用 Slick 调用存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆