$ P $在libdbi ppared声明 [英] Prepared Statements in libdbi

查看:130
本文介绍了$ P $在libdbi ppared声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用libdbi提出申请的数据库无关。我想用prepared语句。如何使用prepared与libdbi陈述?所有的例子,我看到用正常选择喇嘛从泡壳其中foo;通过libdbi输入逃逸提供声明和使用转义功能。

I want to use libdbi to make an application database-agnostic. I would like to use prepared statements. How can I use prepared statements with libdbi? All the examples I saw use normal select bla from blub where foo; statements and use escaping functions provided by libdbi for input escaping.

如果这是不可能做到这一点的libdbi,你可以推荐另一个数据库抽象库,可以做到这或解释为什么这样的功能就没有意义了?

If it is not possible to do this in libdbi, can you recommend another db-abstraction-library that can do that or explain why such a feature does not make sense?

推荐答案

不幸的是,libdbi不支持prepared语句。
来源:位于 http://libdbi.sourceforge.net/docs/programmers-guide
也阅读了本线程syslog-ng的: http://marc.info/?t=129555478500003

Unfortunately, libdbi does NOT support prepared statements. Source: libdbi documentation at http://libdbi.sourceforge.net/docs/programmers-guide Also read this thread at syslog-ng: http://marc.info/?t=129555478500003

如果你不介意C ++,SOCI可能会为你一种替代方案:
http://soci.sourceforge.net

If you don't mind C++, SOCI might be an alternative for you: http://soci.sourceforge.net

这篇关于$ P $在libdbi ppared声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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