summaryrefslogtreecommitdiff
path: root/project2/sql/sqlWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/sql/sqlWriter.cpp')
-rw-r--r--project2/sql/sqlWriter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/project2/sql/sqlWriter.cpp b/project2/sql/sqlWriter.cpp
index 1220211..5278759 100644
--- a/project2/sql/sqlWriter.cpp
+++ b/project2/sql/sqlWriter.cpp
@@ -64,15 +64,15 @@ DynamicSql::SqlCommand::writeSql(Glib::ustring & sql) const
}
void
-DynamicSql::SqlCommand::bindParams(DB::Command * cmd, unsigned int & offset) const
+DynamicSql::SqlCommand::bindParams(ExecContext * ec, DB::Command * cmd, unsigned int & offset) const
{
BOOST_FOREACH(const SqlWriterPtr & w, writers) {
- w->bindParams(cmd, offset);
+ w->bindParams(ec, cmd, offset);
}
}
DynamicSql::SqlFilter::SqlFilter(ScriptNodePtr p) :
- name(p->value("name").as<Glib::ustring>()),
+ name(p->value("name", NULL).as<Glib::ustring>()),
active(false)
{
p->composeWithCallbacks(
@@ -91,11 +91,11 @@ DynamicSql::SqlFilter::writeSql(Glib::ustring & sql) const
}
void
-DynamicSql::SqlFilter::bindParams(DB::Command * cmd, unsigned int & offset) const
+DynamicSql::SqlFilter::bindParams(ExecContext * ec, DB::Command * cmd, unsigned int & offset) const
{
if (active) {
BOOST_FOREACH(const SqlWriterPtr & w, writers) {
- w->bindParams(cmd, offset);
+ w->bindParams(ec, cmd, offset);
}
}
}
@@ -112,9 +112,9 @@ DynamicSql::SqlParameter::writeSql(Glib::ustring & sql) const
}
void
-DynamicSql::SqlParameter::bindParams(DB::Command * cmd, unsigned int & offset) const
+DynamicSql::SqlParameter::bindParams(ExecContext * ec, DB::Command * cmd, unsigned int & offset) const
{
- boost::apply_visitor<const SqlVariableBinder, const VariableType>(SqlVariableBinder(cmd, offset++), (*this));
+ boost::apply_visitor<const SqlVariableBinder, const VariableType>(SqlVariableBinder(cmd, offset++), (*this)(ec));
}
DynamicSql::SqlText::SqlText(const Glib::ustring & n) :
@@ -129,7 +129,7 @@ DynamicSql::SqlText::writeSql(Glib::ustring & sql) const
}
void
-DynamicSql::SqlText::bindParams(DB::Command *, unsigned int &) const
+DynamicSql::SqlText::bindParams(ExecContext *, DB::Command *, unsigned int &) const
{
}