fixed linux compile
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
#ifndef QUERY_AIRPLANE_HPP
|
||||
#define QUERY_AIRPLANE_HPP
|
||||
|
||||
#include "category.hpp"
|
||||
#include "supplier.hpp"
|
||||
|
||||
#include "matador/utils/access.hpp"
|
||||
#include "matador/utils/cascade_type.hpp"
|
||||
#include "matador/utils/field_attributes.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -14,7 +9,7 @@ namespace matador::test {
|
||||
|
||||
struct airplane {
|
||||
airplane() = default;
|
||||
airplane(unsigned int id, std::string b, std::string m)
|
||||
airplane(const unsigned int id, std::string b, std::string m)
|
||||
: id(id)
|
||||
, brand(std::move(b))
|
||||
, model(std::move(m)) {}
|
||||
|
||||
@@ -14,14 +14,13 @@
|
||||
|
||||
namespace matador::test {
|
||||
|
||||
struct flight
|
||||
{
|
||||
struct flight {
|
||||
flight() = default;
|
||||
flight(const unsigned int id, const object::object_ptr<airplane> &plane, std::string name)
|
||||
: id(id), airplane(plane), pilot_name(std::move(name)) {}
|
||||
: id(id), plane(plane), pilot_name(std::move(name)) {}
|
||||
|
||||
unsigned int id{};
|
||||
object::object_ptr<airplane> airplane;
|
||||
object::object_ptr<airplane> plane;
|
||||
std::string pilot_name;
|
||||
|
||||
template<class Operator>
|
||||
@@ -29,7 +28,7 @@ struct flight
|
||||
namespace field = matador::access;
|
||||
using namespace matador::utils;
|
||||
field::primary_key(op, "id", id);
|
||||
field::has_one(op, "airplane_id", airplane, {utils::cascade_type::ALL, utils::fetch_type::EAGER});
|
||||
field::has_one(op, "airplane_id", plane, {utils::cascade_type::ALL, utils::fetch_type::EAGER});
|
||||
field::attribute(op, "pilot_name", pilot_name, 255);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,11 +14,11 @@ struct types
|
||||
int8_t char_ = 'c';
|
||||
short short_ = -127;
|
||||
int int_ = -65000;
|
||||
long long long64_ = -1234567890;
|
||||
int64_t long64_ = -1234567890;
|
||||
unsigned char unsigned_char_ = 'H';
|
||||
unsigned short unsigned_short_ = 128;
|
||||
unsigned int unsigned_int_ = 65000;
|
||||
unsigned long long unsigned_long64_ = 1234567890;
|
||||
uint64_t unsigned_long64_ = 1234567890;
|
||||
float float_ = 3.1415f;
|
||||
double double_ = 1.1414;
|
||||
bool bool_ = true;
|
||||
|
||||
Reference in New Issue
Block a user