Esempio n. 1
0
static void setup_log(SqlConnection &c)
{
    init_log();
    c.init_logger(root_logger.get());
    c.set_echo(true);
}
Esempio n. 2
-1
SqlConnection *Engine::get_from_pool()
{
    if (!pool_.get())
        throw PoolError(_T("Engine with no connection"));
    SqlConnection *conn = pool_->get(source_id_, timeout_);
    if (!conn)
        throw PoolError(_T("Can't get connection"));
    dialect_ = conn->get_dialect();
    conn->set_echo(echo_);
    conn->init_logger(logger_.get());
    return conn;
}