[glom/glom-1-16] Field::sql_find(): Do not quote the string.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-16] Field::sql_find(): Do not quote the string.
- Date: Thu, 23 Jun 2011 19:54:48 +0000 (UTC)
commit 72db44dba5f46662970f3f3f6a71352e0e93c0a9
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jun 23 21:45:50 2011 +0200
Field::sql_find(): Do not quote the string.
* glom/libglom/data_structure/field.cc: SqlBuilder already takes
care of quoting so this just changed the actual value.
This makes Quick Find work again.
ChangeLog | 8 ++++++++
glom/libglom/data_structure/field.cc | 2 +-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bfc38cf..c3d9a97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-06-23 Murray Cumming <murrayc murrayc com>
+ Field::sql_find(): Do not quote the string.
+
+ * glom/libglom/data_structure/field.cc: SqlBuilder already takes
+ care of quoting so this just changed the actual value.
+ This makes Quick Find work again.
+
+2011-06-23 Murray Cumming <murrayc murrayc com>
+
Find: Use backend-specific LIKE or ILIKE operator instead of =.
* glom/libglom/connectionpool.[h|cc]:
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index ef0e019..34e6004 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -382,7 +382,7 @@ Glib::ustring Field::sql_find(const Gnome::Gda::Value& value) const
if(value.is_null())
return "''"; //We want to ignore the concept of NULL strings, and deal only with empty strings.
else
- return ("'%" + value.to_string() + "%'"); //Add single-quotes. TODO: Actually escape it.
+ return ("%" + value.to_string() + "%"); //TODO: Escape it before adding "%", but then prevent SqlBuilder from re-escaping it.
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]