fixed demo project
This commit is contained in:
parent
b9d35cbd4e
commit
e768497cfd
|
|
@ -1,5 +1,5 @@
|
|||
add_executable(demo main.cpp
|
||||
object.cpp)
|
||||
add_executable(demo main.cpp)
|
||||
|
||||
target_link_libraries(demo PRIVATE
|
||||
matador-core
|
||||
matador-orm
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "matador/query/column.hpp"
|
||||
#include "matador/sql/connection.hpp"
|
||||
#include "matador/sql/query_macro.hpp"
|
||||
|
||||
#include "matador/query/criteria.hpp"
|
||||
#include "matador/query/query.hpp"
|
||||
#include "matador/query/table_column.hpp"
|
||||
|
||||
#include "matador/object/object_ptr.hpp"
|
||||
#include "matador/object/repository.hpp"
|
||||
|
|
@ -11,12 +11,8 @@
|
|||
#include "matador/utils/access.hpp"
|
||||
#include "matador/utils/default_type_traits.hpp"
|
||||
#include "matador/utils/enum_mapper.hpp"
|
||||
#include "matador/utils/types.hpp"
|
||||
|
||||
#include "matador/sql/query_macro.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
struct author {
|
||||
unsigned int id{};
|
||||
|
|
@ -144,20 +140,20 @@ struct matador::utils::data_type_traits<job::job_mode, void> {
|
|||
}
|
||||
};
|
||||
|
||||
// QUERY_HELPER( authors, AUTHOR, id, first_name, last_name, date_of_birth, year_of_birth, distinguished )
|
||||
//
|
||||
// QUERY_HELPER( books, BOOK, id, author_id, title, published_in )
|
||||
//
|
||||
// QUERY_HELPER( job, JOB, id, payload, type, description, state, mode )
|
||||
//
|
||||
// QUERY_HELPER( payload, PAYLOAD, id )
|
||||
//
|
||||
// QUERY_HELPER( temporary_table, TEMPORARY_TABLE, id );
|
||||
//
|
||||
// QUERY_HELPER(customer, CUSTOMER, id, name, email, address)
|
||||
// QUERY_HELPER(product, PRODUCT, id, title, description, price, category)
|
||||
// QUERY_HELPER(category, CATEGORY, id, title, description)
|
||||
// QUERY_HELPER(cart, CART, id, items, owner)
|
||||
QUERY_HELPER(authors, AUTHOR, id, first_name, last_name, date_of_birth, year_of_birth, distinguished)
|
||||
|
||||
QUERY_HELPER(books, BOOK, id, author_id, title, published_in)
|
||||
|
||||
QUERY_HELPER(job, JOB, id, payload, type, description, state, mode)
|
||||
|
||||
QUERY_HELPER(payload, PAYLOAD, id )
|
||||
|
||||
QUERY_HELPER(temporary_table, TEMPORARY_TABLE, id );
|
||||
|
||||
QUERY_HELPER(customer, CUSTOMER, id, name, email, address)
|
||||
QUERY_HELPER(product, PRODUCT, id, title, description, price, category)
|
||||
QUERY_HELPER(category, CATEGORY, id, title, description)
|
||||
QUERY_HELPER(cart, CART, id, items, owner)
|
||||
|
||||
int main() {
|
||||
using namespace matador::sql;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <string>
|
||||
#include <ostream>
|
||||
|
||||
#define FIELD(x) const matador::query::column& x = create_column(*this, #x);
|
||||
#define FIELD(x) const matador::query::table_column x = create_column(*this, #x);
|
||||
|
||||
#define QUERY_HELPER(C, V, ...) \
|
||||
namespace matador::query::meta { \
|
||||
|
|
|
|||
Loading…
Reference in New Issue