Closed stigtsp closed 9 years ago
Cool, I'm traveling at the moment but will merge this and do a release soon On Sep 25, 2015 12:17 PM, "Stig" notifications@github.com wrote:
You can view, comment on, or merge this pull request online at:
https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8 Commit Summary
- Added on_connect option to plugin to allow setting variables and such immediately after connection.
- Added on_connect to multi and it's test
File Changes
- M lib/Mojolicious/Plugin/Database.pm https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8/files#diff-0 (28)
- M t/01-functional-single.t https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8/files#diff-1 (25)
- M t/02-functional-multi.t https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8/files#diff-2 (48)
Patch Links:
- https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8.patch
https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8.diff
— Reply to this email directly or view it on GitHub https://github.com/benvanstaveren/Mojolicious-Plugin-Database/pull/8.
On second thoughts, this is actually not a good patch. This feature should be handled by 'Connected' to properly handle auto-connect etc.
I'd recommend reverting my patch.
I'm still on the fence about it really, the DBI callbacks seem to be a bit of a sledgehammer type thing, I'll ponder it some more :)
Hi, added on_connect support to this module. Useful for setting variables in the db connection etc.