SqlResult Connection::InternalEstablish(const std::string& server) { config::Configuration config; if (server != config.GetDsn()) { AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, "Unknown server."); return SQL_RESULT_ERROR; } return InternalEstablish(config.GetHost(), config.GetPort(), config.GetCache()); }
SqlResult Connection::InternalEstablish(const std::string& connectStr) { config::Configuration config; try { config.FillFromConnectString(connectStr); } catch (IgniteError& e) { AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, e.GetText()); return SQL_RESULT_ERROR; } return InternalEstablish(config); }
void Connection::Establish(const std::string& connectStr) { IGNITE_ODBC_API_CALL(InternalEstablish(connectStr)); }
void Connection::Establish(const config::Configuration cfg) { IGNITE_ODBC_API_CALL(InternalEstablish(cfg)); }
void Connection::Establish(const std::string& host, uint16_t port, const std::string& cache) { IGNITE_ODBC_API_CALL(InternalEstablish(host, port, cache)); }