backend tests progress
This commit is contained in:
@@ -234,19 +234,15 @@ sql::record mysql_connection::describe(const std::string &table)
|
||||
while (reader.fetch()) {
|
||||
|
||||
char *end = nullptr;
|
||||
// Todo: Handle error
|
||||
auto index = strtoul(reader.column(0), &end, 10);
|
||||
std::string name = reader.column(0);
|
||||
|
||||
// Todo: extract size
|
||||
auto typeinfo = determine_type_info(reader.column(1));
|
||||
end = nullptr;
|
||||
sql::null_option null_opt{sql::null_option::NULLABLE};
|
||||
if (strtoul(reader.column(2), &end, 10) == 0) {
|
||||
null_opt = sql::null_option::NOT_NULL;
|
||||
}
|
||||
// f.default_value(res->column(4));
|
||||
prototype.append({name, typeinfo.type, {typeinfo.size}, null_opt});
|
||||
prototype.append({name, typeinfo.type, {typeinfo.size}, null_opt, prototype.size()});
|
||||
}
|
||||
|
||||
return prototype;
|
||||
|
||||
Reference in New Issue
Block a user