Hi peeps, Me again. This time with a different question :).
The background is that I'm implementing nested transaction handling, initially for mysql which can handle it using SAVEPOINTs. What I'm bashing my head against currently is determining whether the database that is connected to supports SAVEPOINTs or not. This is easy in principle, one just issues a 'SELECT VERSION()' call, reads the response and determines whether that version supports this or not. However, I don't want to have to issue this every time a begin/commit/rollback is called. So, I could call it once and then cache the result. However it is probably nicer to have this command issued once, when the connect is made by the API, and the result cached for the duration of the connection. So this is the question then. What's the smartest way of allowing .../DBI/driver.pm to have arbitary SQL statements issued at connect time? I notice that there is already functionality for 'on_connect_do' statements specified by the user. It doesn't seem as if the return value of any of these can be obtained though (I might be smoking crack on this point - not looked too deeply yet). Perhaps the database drivers could hook into this mechanism in a transparent way. I'd welcome opinions on this. Thanks, Joe
pgpx1MXUzRTPf.pgp
Description: PGP signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
