Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
Loading...
Searching...
No Matches
Model.hpp
Go to the documentation of this file.
1#pragma once
4
13#define ORBIT_REGISTER_MODEL(Type, TableName) \
14 template <typename DBClient> \
15 inline orm::QueryBuilder<DBClient, Type> query_##Type(std::shared_ptr<DBClient> db) { \
16 return orm::QueryBuilder<DBClient, Type>(db, TableName); \
17 }
18
24#define ORBIT_REGISTER_MONGO_MODEL(Type) \
25 inline orm::MongoQueryBuilder<Type> query_mongo_##Type(std::shared_ptr<database::MongoClient> db) { \
26 return orm::MongoQueryBuilder<Type>(db); \
27 }