[glom] Added TODOs about places that might need quoting.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Subject: [glom] Added TODOs about places that might need quoting.
- Date: Sat, 18 Jul 2009 19:49:59 +0000 (UTC)
commit 74d38a53c9847112e14a3a5b61a8280576ec4a6c
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Jul 18 21:44:44 2009 +0200
Added TODOs about places that might need quoting.
glom/libglom/connectionpool_backends/backend.cc | 2 ++
glom/libglom/connectionpool_backends/sqlite.cc | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/glom/libglom/connectionpool_backends/backend.cc b/glom/libglom/connectionpool_backends/backend.cc
index dc350ba..a0be64b 100644
--- a/glom/libglom/connectionpool_backends/backend.cc
+++ b/glom/libglom/connectionpool_backends/backend.cc
@@ -195,6 +195,7 @@ bool Backend::add_column(const Glib::RefPtr<Gnome::Gda::Connection>& connection,
Glib::RefPtr<Gnome::Gda::ServerOperation> operation = create_server_operation(provider, connection, Gnome::Gda::SERVER_OPERATION_ADD_COLUMN, error);
if(!operation) return false;
+ //TODO: Quote table_name and field_name?
if(!set_server_operation_value(operation, "/COLUMN_DEF_P/TABLE_NAME", table_name, error))
return false;
@@ -223,6 +224,7 @@ bool Backend::drop_column(const Glib::RefPtr<Gnome::Gda::Connection>& connection
if(!operation)
return false;
+ //TODO: Quote table name and column name?
if(!set_server_operation_value(operation, "/COLUMN_DESC_P/TABLE_NAME", table_name, error))
return false;
diff --git a/glom/libglom/connectionpool_backends/sqlite.cc b/glom/libglom/connectionpool_backends/sqlite.cc
index 5df0ac3..96e31f0 100644
--- a/glom/libglom/connectionpool_backends/sqlite.cc
+++ b/glom/libglom/connectionpool_backends/sqlite.cc
@@ -122,6 +122,7 @@ bool Sqlite::create_database(const Glib::ustring& database_name, const Glib::ust
bool Sqlite::add_column_to_server_operation(const Glib::RefPtr<Gnome::Gda::ServerOperation>& operation, GdaMetaTableColumn* column, unsigned int i, std::auto_ptr<Glib::Error>& error)
{
+ //TODO: Quote column name?
const Glib::ustring name_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_NAME/%1", i);
const Glib::ustring type_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_TYPE/%1", i);
const Glib::ustring pkey_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_PKEY/%1", i);
@@ -145,6 +146,7 @@ bool Sqlite::add_column_to_server_operation(const Glib::RefPtr<Gnome::Gda::Serve
bool Sqlite::add_column_to_server_operation(const Glib::RefPtr<Gnome::Gda::ServerOperation>& operation, const sharedptr<const Field>& column, unsigned int i, std::auto_ptr<Glib::Error>& error)
{
+ //TODO: Quote column name?
const Glib::ustring name_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_NAME/%1", i);
const Glib::ustring type_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_TYPE/%1", i);
const Glib::ustring pkey_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_PKEY/%1", i);
@@ -174,6 +176,7 @@ bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connecti
if(!operation)
return false;
+ //TODO: Quote table name?
if(!set_server_operation_value(operation, "/TABLE_DEF_P/TABLE_NAME", TEMPORARY_TABLE_NAME, error)) return false;
GdaMetaTable* table = GDA_META_TABLE(object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]