added more tests

This commit is contained in:
Sascha Kühl
2025-02-06 16:17:47 +01:00
parent c76aa56440
commit 0b70f5d4ee
68 changed files with 2117 additions and 263 deletions
+30
View File
@@ -0,0 +1,30 @@
#ifndef QUERY_OPTIONAL_HPP
#define QUERY_OPTIONAL_HPP
#include "matador/utils/access.hpp"
#include "matador/utils/field_attributes.hpp"
#include <optional>
#include <string>
namespace matador::test {
struct optional
{
unsigned int id{};
std::optional<std::string> name;
std::optional<unsigned int> age{};
template<class Operator>
void process(Operator &op) {
namespace field = matador::access;
using namespace matador::utils;
field::primary_key(op, "id", id);
field::attribute(op, "name", name, 255);
field::attribute(op, "age", age);
}
};
}
#endif //QUERY_OPTIONAL_HPP