added index attribute to field class

This commit is contained in:
2024-03-10 17:22:38 +01:00
parent 6bbc870362
commit 9a02abacea
3 changed files with 22 additions and 4 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ TEST_CASE("Field test", "[field]") {
sql::field f("name");
REQUIRE(f.name() == "name");
REQUIRE(f.index() == -1);
REQUIRE(f.is_null());
REQUIRE(!f.is_integer());
REQUIRE(!f.is_floating_point());
@@ -36,7 +37,8 @@ TEST_CASE("Field test", "[field]") {
REQUIRE(bool_val.has_value());
REQUIRE(bool_val.value());
f = utils::blob{ 7,8,6,5,4,3 };
f = sql::field("name", utils::blob{ 7,8,6,5,4,3 }, 1);
REQUIRE(f.index() == 1);
REQUIRE(!f.is_null());
REQUIRE(!f.is_integer());
REQUIRE(!f.is_floating_point());