[libgda/LIBGDA_4.2] Virtual provider: correctly map data types to SQLite types
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] Virtual provider: correctly map data types to SQLite types
- Date: Sun, 9 Oct 2011 15:25:14 +0000 (UTC)
commit fc3a3f02b7bf0f5e00292e3d8f2091a4a1ed60a5
Author: Vivien Malerba <malerba gnome-db org>
Date: Sun Sep 25 21:23:40 2011 +0200
Virtual provider: correctly map data types to SQLite types
libgda/sqlite/virtual/gda-vprovider-data-model.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libgda/sqlite/virtual/gda-vprovider-data-model.c b/libgda/sqlite/virtual/gda-vprovider-data-model.c
index 9e9b4d7..3a50f9e 100644
--- a/libgda/sqlite/virtual/gda-vprovider-data-model.c
+++ b/libgda/sqlite/virtual/gda-vprovider-data-model.c
@@ -530,11 +530,14 @@ virtualCreate (sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlit
type = "binary";
else if (gtype == G_TYPE_STRING)
type = "string";
- else if ((gtype == G_TYPE_INT) || (gtype == G_TYPE_UINT) ||
- (gtype == G_TYPE_INT64) || (gtype == G_TYPE_UINT64) ||
- (gtype == GDA_TYPE_SHORT) || (gtype == GDA_TYPE_USHORT) ||
- (gtype == G_TYPE_LONG) || (gtype == G_TYPE_ULONG))
+ else if ((gtype == G_TYPE_INT) || (gtype == GDA_TYPE_SHORT))
type = "integer";
+ else if ((gtype == G_TYPE_UINT) || (gtype == GDA_TYPE_USHORT))
+ type = "unsigned integer";
+ else if ((gtype == G_TYPE_INT64) || (gtype == G_TYPE_LONG))
+ type = "int64";
+ else if ((gtype == G_TYPE_UINT64) || (gtype == G_TYPE_ULONG))
+ type = "uint64";
else if ((gtype == G_TYPE_DOUBLE) || (gtype == G_TYPE_FLOAT))
type = "real";
else if (gtype == G_TYPE_DATE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]