简体   繁体   English

使用Slick调用存储过程

[英]Calling stored procedures with Slick

How do I use Slick to call a stored procedure? 如何使用Slick调用存储过程?

I want it to be type safe / injection safe. 我希望它是类型安全/注射安全的。 (ie, I don't want any SQL query strings in my code...) (即,我不想在我的代码中使用任何SQL查询字符串...)

According to the docs, Slick includes "Type-safe support of stored procedures" ( http://slick.typesafe.com/doc/1.0.0/introduction.html ) 根据文档,Slick包含“存储过程的类型安全支持”( 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. 但我没有在文档中看到如何做到这一点的任何例子。

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. 目前,您必须使用纯SQL来调用存储过程。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM