backend tests progress

This commit is contained in:
2024-01-31 07:21:06 +01:00
parent e171147915
commit 7c02d745c8
9 changed files with 88 additions and 20 deletions
@@ -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);