diff options
Diffstat (limited to 'project2/sql/sqlWriter.cpp')
-rw-r--r-- | project2/sql/sqlWriter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/project2/sql/sqlWriter.cpp b/project2/sql/sqlWriter.cpp index 5278759..cd9108d 100644 --- a/project2/sql/sqlWriter.cpp +++ b/project2/sql/sqlWriter.cpp @@ -50,13 +50,13 @@ DynamicSql::SqlCommand::getSqlFor(const Glib::ustring & f) const BOOST_FOREACH(const SqlCommand::Filters::value_type & filter, filters) { filter.second->active = (filter.second->name == f); } - Glib::ustring sql; + Buffer sql; writeSql(sql); - return sql; + return Glib::ustring(sql.str()); } void -DynamicSql::SqlCommand::writeSql(Glib::ustring & sql) const +DynamicSql::SqlCommand::writeSql(Buffer & sql) const { BOOST_FOREACH(const SqlWriterPtr & w, writers) { w->writeSql(sql); @@ -81,7 +81,7 @@ DynamicSql::SqlFilter::SqlFilter(ScriptNodePtr p) : } void -DynamicSql::SqlFilter::writeSql(Glib::ustring & sql) const +DynamicSql::SqlFilter::writeSql(Buffer & sql) const { if (active) { BOOST_FOREACH(const SqlWriterPtr & w, writers) { @@ -106,7 +106,7 @@ DynamicSql::SqlParameter::SqlParameter(ScriptNodePtr n) : } void -DynamicSql::SqlParameter::writeSql(Glib::ustring & sql) const +DynamicSql::SqlParameter::writeSql(Buffer & sql) const { sql.append("?"); } @@ -123,7 +123,7 @@ DynamicSql::SqlText::SqlText(const Glib::ustring & n) : } void -DynamicSql::SqlText::writeSql(Glib::ustring & sql) const +DynamicSql::SqlText::writeSql(Buffer & sql) const { sql.append(text); } |