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