added mysql backend
This commit is contained in:
@@ -156,7 +156,6 @@ sql::record sqlite_connection::describe(const std::string& table)
|
||||
auto index = strtoul(reader.column(0), &end, 10);
|
||||
std::string name = reader.column(1);
|
||||
|
||||
// Todo: extract size
|
||||
auto type = (string2type(reader.column(2)));
|
||||
end = nullptr;
|
||||
utils::constraints options{};
|
||||
@@ -170,7 +169,7 @@ sql::record sqlite_connection::describe(const std::string& table)
|
||||
return std::move(prototype);
|
||||
}
|
||||
|
||||
bool sqlite_connection::exists(const std::string &table_name)
|
||||
bool sqlite_connection::exists(const std::string &schema_name, const std::string &table_name)
|
||||
{
|
||||
const auto result = fetch_internal("SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND tbl_name='" + table_name + "' LIMIT 1");
|
||||
sqlite_result_reader reader(result.rows, result.prototype.size());
|
||||
|
||||
Reference in New Issue
Block a user