[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src/oql oql.c
From: |
Reinhard Mueller |
Subject: |
gnue/geas/src/oql oql.c |
Date: |
Wed, 05 Sep 2001 23:18:08 -0700 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Reinhard Mueller <address@hidden> 01/09/05 23:18:08
Modified files:
geas/src/oql : oql.c
Log message:
Removed "upper()" sql function, as it was causing sql errors for date
fields.
It should only be called for char, varchar and maybe text. Until this
is fixed, case insensitive comparsion is broken.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/geas/src/oql/oql.c.diff?tr1=1.67&tr2=1.68&r1=text&r2=text
Patches:
Index: gnue/geas/src/oql/oql.c
diff -u gnue/geas/src/oql/oql.c:1.67 gnue/geas/src/oql/oql.c:1.68
--- gnue/geas/src/oql/oql.c:1.67 Wed Sep 5 00:59:40 2001
+++ gnue/geas/src/oql/oql.c Wed Sep 5 23:18:08 2001
@@ -19,7 +19,7 @@
along with GEAS; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: oql.c,v 1.67 2001/09/05 07:59:40 reinhard Exp $
+ $Id: oql.c,v 1.68 2001/09/06 06:18:08 reinhard Exp $
*/
#include "config.h"
@@ -186,19 +186,23 @@
g_string_append (buf, "(");
+/* FIXME: upper may only be used for char and varchar fields
if (!c->casesensitive)
{
g_string_append (buf, "upper(");
}
+*/
quoted = oql_quote_column (c->targetclass, c->field, db);
g_string_append (buf, quoted);
g_free (quoted);
+/*
if (!c->casesensitive)
{
g_string_append (buf, ")");
}
+*/
switch (c->test)
{
@@ -256,18 +260,22 @@
break;
}
+/* FIXME: upper may only be used for char and varchar fields
if (!c->casesensitive)
{
g_string_append (buf, "upper(");
}
+*/
g_string_append (buf, quoted);
g_free (quoted);
+/*
if (!c->casesensitive)
{
g_string_append (buf, ")");
}
+*/
g_string_append (buf, ")");
@@ -1697,19 +1705,23 @@
oql_field *f = l->data;
/* field */
+/* FIXME: upper may only be used for char and varchar fields
if (!f->casesensitive)
{
g_string_append (buf, "upper(");
}
+*/
quoted = oql_quote_column (classname, f->field, db);
g_string_append (buf, quoted);
g_free (quoted);
+/*
if (!f->casesensitive)
{
g_string_append (buf, ")");
}
+*/
/* test, and prepare 'quoted' with value, and extra characters needed by
the test */
switch (f->test)
@@ -1786,16 +1798,21 @@
}
/* add the value to test */
+/* FIXME: upper may only be used for char and varchar fields
if (!f->casesensitive)
{
g_string_append (buf, "upper(");
}
+*/
g_string_append (buf, quoted);
+
+/*
if (!f->casesensitive)
{
g_string_append (buf, ")");
}
+*/
/* next */
if (l->next)