[gom] gom: Support boolean properties
- From: Mathieu Bridon <mbridon src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gom] gom: Support boolean properties
 
- Date: Tue,  6 May 2014 18:34:11 +0000 (UTC)
 
commit 0125e26d90923c9e90876b976f455b80ce59843d
Author: Mathieu Bridon <bochecha fedoraproject org>
Date:   Wed May 7 02:15:49 2014 +0800
    gom: Support boolean properties
    
    SQLite does not have a boolean column type, so we need to use integers
    instead:
    
        https://www.sqlite.org/datatype3.html
    
    Luckily, the gboolean type is in fact nothing but an integer.
 gom/gom-command-builder.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gom/gom-command-builder.c b/gom/gom-command-builder.c
index 6a02562..ece6fbc 100644
--- a/gom/gom-command-builder.c
+++ b/gom/gom-command-builder.c
@@ -62,6 +62,7 @@ sql_type_for_column (GParamSpec *pspec)
    case G_TYPE_INT64:
    case G_TYPE_UINT:
    case G_TYPE_UINT64:
+   case G_TYPE_BOOLEAN:
       return "INTEGER";
    case G_TYPE_STRING:
       return "TEXT";
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]