added mysql backend
This commit is contained in:
@@ -161,9 +161,9 @@ sql::record postgres_connection::describe(const std::string &table)
|
||||
return std::move(prototype);
|
||||
}
|
||||
|
||||
bool postgres_connection::exists(const std::string &table_name)
|
||||
bool postgres_connection::exists(const std::string &schema_name, const std::string &table_name)
|
||||
{
|
||||
std::string stmt("SELECT 1 FROM information_schema.tables WHERE table_schema = 'public' AND table_name = '" + table_name + "'");
|
||||
std::string stmt("SELECT 1 FROM information_schema.tables WHERE table_schema = '" + schema_name + "' AND table_name = '" + table_name + "'");
|
||||
|
||||
PGresult *res = PQexec(conn_, stmt.c_str());
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
namespace matador::backends::postgres {
|
||||
|
||||
postgres_statement::postgres_statement(PGconn *db, PGresult *result, const std::string &name, const sql::query_context &query)
|
||||
postgres_statement::postgres_statement(PGconn *db, PGresult *result, std::string name, const sql::query_context &query)
|
||||
: statement_impl(query)
|
||||
, db_(db)
|
||||
, result_(result)
|
||||
, name_(name)
|
||||
, name_(std::move(name))
|
||||
, binder_(query_.bind_vars.size())
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user