[libgda/LIBGDA_4.2] GdaStatement: render default values as "DEFAULT"
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] GdaStatement: render default values as "DEFAULT"
- Date: Sun, 9 Oct 2011 15:24:59 +0000 (UTC)
commit a8ce6f1c74076e2c896ae4366db9c428e30468af
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat Sep 24 21:40:47 2011 +0200
GdaStatement: render default values as "DEFAULT"
libgda/gda-statement.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libgda/gda-statement.c b/libgda/gda-statement.c
index 042da47..194cc44 100644
--- a/libgda/gda-statement.c
+++ b/libgda/gda-statement.c
@@ -784,9 +784,14 @@ default_render_value (const GValue *value, GdaSqlRenderingContext *context, GErr
dh = gda_data_handler_get_default (G_VALUE_TYPE (value));
if (!dh) {
- g_set_error (error, GDA_SQL_ERROR, GDA_SQL_STRUCTURE_CONTENTS_ERROR,
- _("No data handler for type '%s'"), g_type_name (G_VALUE_TYPE (value)));
- return NULL;
+ if (G_VALUE_TYPE (value) == GDA_TYPE_DEFAULT)
+ return g_strdup ("DEFAULT");
+ else {
+ g_set_error (error, GDA_SQL_ERROR, GDA_SQL_STRUCTURE_CONTENTS_ERROR,
+ _("No data handler for type '%s'"),
+ g_type_name (G_VALUE_TYPE (value)));
+ return NULL;
+ }
}
return gda_data_handler_get_sql_from_value (dh, value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]