[Haskell-cafe] The ping method in HDBC

John Goerzen jgoerzen at complete.org
Mon Jun 30 09:31:56 EDT 2008

Agent Zhang wrote:
> Hi, there
> I'm wondering if there's a ping method in HDBC that does the same
> thing as Perl DBI's ping. Please see the following link for details:
>     http://search.cpan.org/~timb/DBI-1.605/DBI.pm#ping
> I think It's rather important for database auto-connection when
> preserving database connections for a quite long time in fastcgi
> applications. Any ideas?
> Thanks in advance!

There's no specific ping function, but you can try something like:

run dbh "SELECT 1" []

I note from the Perl DBI documentation that it is not guaranteed that
its ping function actually does anything.

I am pondering connection pools in HDBC for the future, if I have the
need for it.

-- John

More information about the Haskell-Cafe mailing list