Add drogon::orm to models generation (#1092)

This commit is contained in:
Ichiro 2021-11-26 12:29:47 +09:00 committed by GitHub
parent ec8146774a
commit faf3e0c17c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -118,7 +118,7 @@ const std::string &[[className]]::getColumnName(size_t index) noexcept(false)
assert(index < metaData_.size());
return metaData_[index].colName_;
}
[[className]]::[[className]](const Row &r, const ssize_t indexOffset) noexcept
[[className]]::[[className]](const drogon::orm::Row &r, const ssize_t indexOffset) noexcept
{
if(indexOffset < 0)
{

View File

@ -27,7 +27,6 @@ using namespace drogon_ctl;
#include <stdint.h>
#include <iostream>
using namespace drogon::orm;
namespace drogon
{
namespace orm
@ -129,7 +128,7 @@ auto cols=@@.get<std::vector<ColumnInfo>>("columns");
* @note If the SQL is not a style of 'select * from table_name ...' (select all
* columns by an asterisk), please set the offset to -1.
*/
explicit [[className]](const Row &r, const ssize_t indexOffset = 0) noexcept;
explicit [[className]](const drogon::orm::Row &r, const ssize_t indexOffset = 0) noexcept;
/**
* @brief constructor
@ -297,9 +296,9 @@ auto cols=@@.get<std::vector<ColumnInfo>>("columns");
}
%>
private:
friend Mapper<[[className]]>;
friend drogon::orm::Mapper<[[className]]>;
#ifdef __cpp_impl_coroutine
friend CoroMapper<[[className]]>;
friend drogon::orm::CoroMapper<[[className]]>;
#endif
static const std::vector<std::string> &insertColumns() noexcept;
void outputArgs(drogon::orm::internal::SqlBinder &binder) const;