added belongs-to-eager test
This commit is contained in:
@@ -8,21 +8,18 @@
|
||||
#include <cstdint>
|
||||
|
||||
namespace matador::test {
|
||||
|
||||
enum class Color : uint8_t {
|
||||
Green, Red, Blue, Yellow, Black, White, Brown
|
||||
};
|
||||
|
||||
struct location
|
||||
{
|
||||
struct location {
|
||||
unsigned int id{};
|
||||
std::string name;
|
||||
coordinate coord;
|
||||
Color color{Color::Green};
|
||||
|
||||
template < class Operator >
|
||||
void process(Operator &op)
|
||||
{
|
||||
template<class Operator>
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "name", name, 255);
|
||||
@@ -30,7 +27,6 @@ struct location
|
||||
field::attribute(op, "color", color);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //QUERY_LOCATION_HPP
|
||||
|
||||
Reference in New Issue
Block a user