backend tests progress

This commit is contained in:
2024-02-01 17:14:48 +01:00
parent 7c02d745c8
commit c025fb282a
23 changed files with 354 additions and 272 deletions
+1 -5
View File
@@ -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;
+2 -1
View File
@@ -24,7 +24,8 @@ set(TEST_SOURCES
../../tests/ConnectionTest.cpp
../../tests/SessionRecordTest.cpp
../../tests/StatementTest.cpp
../../tests/TypeTraitsTest.cpp)
../../tests/TypeTraitsTest.cpp
../../tests/StatementCacheTest.cpp)
set(LIBRARY_TEST_TARGET mysql_tests)