[libgda] SQL rendering correction
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] SQL rendering correction
- Date: Thu, 29 Dec 2011 17:53:13 +0000 (UTC)
commit f4f6fb8fc0df327d747d39e38b3155fa05e2b1eb
Author: Vivien Malerba <malerba gnome-db org>
Date: Thu Dec 29 18:43:19 2011 +0100
SQL rendering correction
correctly enclose between parenthesis SELECT statements in expressions
libgda/gda-statement.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libgda/gda-statement.c b/libgda/gda-statement.c
index 5fd2a7c..f5c92cf 100644
--- a/libgda/gda-statement.c
+++ b/libgda/gda-statement.c
@@ -1729,7 +1729,11 @@ default_render_function (GdaSqlFunction *func, GdaSqlRenderingContext *context,
g_string_append (string, ", ");
str = context->render_expr (list->data, context, NULL, NULL, error);
if (!str) goto err;
+ if (((GdaSqlExpr*) list->data)->select)
+ g_string_append_c (string, '(');
g_string_append (string, str);
+ if (((GdaSqlExpr*) list->data)->select)
+ g_string_append_c (string, ')');
g_free (str);
}
g_string_append_c (string, ')');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]