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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user