I'm curious if there's a way to disconnect a dbi_conn without destroying the 
handle in the process?

The Ferite Libdbi interface works on a 'connect or die' system, something like 
this:

object dbh = Dbi.connect("mysql", "localhost", "root");
if( !dbh ) { // Failed to connect } else { // Connected }

At the moment, I am attempting to modify this to allow, for example:

object dbh = new Dbi();
dbh.connect("mysql", "localhost", "root");
if( !dbh.connected() ) { println( dbh.errmsg() ); }

Then, freely dbh.close() and dbh.open() later on.  The trouble is I can't 
figure out a way to close the connection without destroying the underlying 
dbi_conn handle.

If there isn't currently a way, would a patch implementing, for example, a 
"dbi_conn_disconnect(dbi_conn Conn)" be considered?

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users

Reply via email to