开发者

How do I quote columns using DBIx::Class

开发者 https://www.devze.com 2023-03-18 14:38 出处:网络
I\'m converting a script 开发者_如何学运维from using DBI to DBIx::Class and I\'m having trouble figuring

I'm converting a script 开发者_如何学运维from using DBI to DBIx::Class and I'm having trouble figuring out how to replace quoting as in : $dbh->quote( $var ); I've seen some stuff in the docs about creating your own functions but that would require me to find out the appropriate quoting scheme, which doesn't seem to make sense.

How do I quote a variable, using DBIx::Class so that it's ready to be inserted in to the database.


You can access the underlying DBI handle's quote function by using the following:

$schema->storage->dbh->quote(...)
0

精彩评论

暂无评论...
验证码 换一张
取 消