#ifndef DB_SELECTCOMMANDUTIL_IMPL_H #define DB_SELECTCOMMANDUTIL_IMPL_H #include "selectcommand.h" #include #include /// @cond namespace DB { template inline typename boost::disable_if_c::value>::type forEachField(DB::SelectCommand *, const Func & func, const Fn & ... args) { func(args...); } template inline typename boost::enable_if_c::value>::type forEachField(DB::SelectCommand * sel, const Func & func, const Args & ... args) { typename std::tuple_element::type a; (*sel)[field] >> a; forEachField(sel, func, args..., a); } template inline void SelectCommand::forEachRow(const Func & func) { while (fetch()) { forEachField, Func, 0>(this, func); } } } /// @endcond #endif