stefanocasazza / ULib

C++ application development framework, to help developers create and deploy applications quickly and simply
GNU Lesser General Public License v3.0
947 stars 107 forks source link

Orm extension #77

Closed ArchNemSyS closed 4 years ago

ArchNemSyS commented 4 years ago

A simple extension to the templates in orm.h to allow 20 columns

Thought others may find this useful even if it is a little hard to read needs testing before hitting stable but I haven't had any issues yet

victorstewart commented 4 years ago

you could replace all of this with a single variadic template method and a c++17 fold expression

template <typename...Ts> 
void use(Ts&&... ts)
{
   (bindParam(UOrmTypeHandler<Ts>(ts)), ...);
}