}
};
+namespace {
+class BindVisitor {
+private:
+ DataCommand *m_command;
+public:
+ ArgumentIndex m_bindArgumentIndex;
+
+ BindVisitor(DataCommand *command) :
+ m_command(command),
+ m_bindArgumentIndex(1)
+ {}
+
+ template<typename ColumnType>
+ void Visit(const char*, const ColumnType& value, bool isSet)
+ {
+ if ( isSet )
+ {
+ DataCommandUtils::BindArgument(m_command, m_bindArgumentIndex, value);
+ m_bindArgumentIndex++;
+ }
+ }
+};
+} //anonymous namespace
template<typename TableDefinition>
class __attribute__ ((visibility("hidden"))) Insert : public Query<TableDefinition>
{
}
}
- class BindVisitor {
- private:
- DataCommand *m_command;
- ArgumentIndex m_bindArgumentIndex;
- public:
- BindVisitor(DataCommand *command) :
- m_command(command),
- m_bindArgumentIndex(1)
- {}
-
- template<typename ColumnType>
- void Visit(const char*, const ColumnType& value, bool isSet)
- {
- if ( isSet )
- {
- DataCommandUtils::BindArgument(m_command, m_bindArgumentIndex, value);
- m_bindArgumentIndex++;
- }
- }
- };
-
void Bind()
{
BindVisitor visitor(this->m_command);
}
}
- class BindVisitor {
- private:
- DataCommand *m_command;
-
- public:
- ArgumentIndex m_bindArgumentIndex;
-
- BindVisitor(DataCommand *command) :
- m_command(command),
- m_bindArgumentIndex(1)
- {}
-
- template<typename ColumnType>
- void Visit(const char*, const ColumnType& value, bool isSet)
- {
- if ( isSet )
- {
- DataCommandUtils::BindArgument(m_command, m_bindArgumentIndex, value);
- m_bindArgumentIndex++;
- }
- }
- };
-
void Bind()
{
BindVisitor visitor(this->m_command);