mysql - Perl DBI without accessing the database -



mysql - Perl DBI without accessing the database -

i'm creating set of sql insert statements database doesn't exist yet, , i'm saving them file.

how can utilize perl's powerful dbi module create insert statements without accessing specific database. in particular, looks using $dbh->quote() function requires instantiate $dbh connection database.

unfortunately, actual quote() behaviour isn't portable characteristic, each driver them differently. unless connect driver, don't know quoting format utilize in practice. (there 1 module might without connection, dbix::abstract, not current.).

the quote() method implemented corresponding driver class, in dbd::* namespace. might effort load driver need , phone call function straight (see http://search.cpan.org/~timb/dbi-1.616/lib/dbi/dbd.pm#writing_dbd::driver::db::quote) feels grubby.

i'd still create dbi connection, if right format of quoting. don't need send statements, know quoting format right database use.

mysql sql database perl dbi

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -