On Wednesday, 1 February 2017 at 14:06:39 UTC, Suliman wrote:
Am I right understand that Connection instance should created at constructor and be one single for all class (and it will be reused by fibers) or am I wrong?

If yes, where I should to close it? To put
scope(exit) c.close();

In destructor?

If yes, does it behavior should be same as for working in vibed pool and without?

If I right understand class MysqlDB do not throw any exceptions, So I can't understand how to handle wrong connection.

if(connection is null)
{
        try // useless
        {
                connection = mydb.lockConnection();             
        }
        catch(Exception e)
        {
                writeln(e.msg);
        }
}

Reply via email to