Builder/Provider/Database/generate.js
[app.Builder.js] / Builder / Provider / Database / generate.js
index 46c538d..5a3005c 100644 (file)
@@ -75,7 +75,7 @@ Gda.DataSelect.prototype.fetchAll = function()
         cols.forEach(function(n,i) {
             var val = _this.get_value_at(i,r);
             var type = GObject.type_name(val.g_type) ;
-            var vs = type == 'GdaBinary' ? val.value.to_string(1024) : val.value;
+            var vs = ['GdaBinary', 'GdaBlob' ].indexOf(type) > -1 ? val.value.to_string(1024) : val.value;
             //print(n + " : TYPE: " + GObject.type_name(val.g_type) + " : " + vs);
             //print (n + '=' + iter.get_value_at(i).value);
             add[n] = vs;
@@ -102,7 +102,8 @@ var map = {
     'longtext' : 'string',
     'mediumtext' : 'string',
     'enum' : 'string',
-    
+    'timestamp' : 'number',
+    'blob' : 'text'
     
 }
 
@@ -207,7 +208,7 @@ tables.forEach(function(table) {
        
     var firstTxtCol = '';
     
-    //print(JSON.stringify(schema, null,4));
+    print(JSON.stringify(schema, null,4));
     
     schema.forEach(function(e)  {
         var type = e.Type.match(/([^(]+)\(([^\)]+)\)/);