[Dancer-users] Dancer::Plugin::Database new features - dbi_params and on_connect_do settings
David Precious
davidp at preshweb.co.uk
Wed Jun 16 00:42:08 CEST 2010
Just FYI, version 0.06 of Dancer::Plugin::Database has just been released,
incorporating two new features, courtesy of Igor Bujna - thanks Igor!
The changes are:
* the ability to provide parameters to be passed to the DBI->connect call,
e.g. RaiseError or AutoCommit
* the ability to provide a list of queries which should be performed
immediately upon connection to the database.
An example configuration block, showing the new dbi_params and on_connect_do
settings in use, is:
plugins:
Database:
driver: 'mysql'
database: 'test'
host: 'localhost'
username: 'myusername'
password: 'mypassword'
connectivity-check-threshold: 10
dbi_params:
RaiseError: 1
AutoCommit: 1
on_connect_do: ["SET NAMES 'utf8'", "SET CHARACTER SET 'utf8'" ]
Cheers
Dave P
--
David Precious <davidp at preshweb.co.uk>
http://blog.preshweb.co.uk/ www.preshweb.co.uk/twitter
www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook
www.preshweb.co.uk/identica www.lyricsbadger.co.uk
"Programming is like sex. One mistake and you have to support
it for the rest of your life". (Michael Sinz)
More information about the Dancer-users
mailing list