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;
'longtext' : 'string',
'mediumtext' : 'string',
'enum' : 'string',
-
+ 'timestamp' : 'number',
+ 'blob' => 'text'
}
//--- load ini files..
// this is very specific.
- var dirs = File.list( GLib.get_home_dir() + '/gitlive').filter(
- function(e) { return e.match(/^Pman/); }
+
+ var dirs = File.list( cfg.INI + '/Pman').filter(
+ function(e) {
+ if (!File.isDirectory(cfg.INI + '/Pman/' + e + '/DataObjects')) {
+ return false;
+ }
+ return true;
+ }
);
+
dirs.forEach(function(d) {
// this currently misses the web.*/Pman/XXXX/DataObjects..
- var path = GLib.get_home_dir() + '/gitlive/' + d + '/DataObjects';
- if (!File.isDirectory(path)) {
- path = GLib.get_home_dir() + '/gitlive/' + d + '/Pman/DataObjects';
- }
-
+ var path = cfg.INI + '/Pman/' + d + '/DataObjects';
+
if (!File.isDirectory(path)) {
return; //skip
}
}
-//print(JSON.stringify(ini, null,4));
+print(JSON.stringify(ini, null,4));
//console.dump(ini);
var firstTxtCol = '';
- //print(JSON.stringify(schema, null,4));
+ print(JSON.stringify(schema, null,4));
schema.forEach(function(e) {
var type = e.Type.match(/([^(]+)\(([^\)]+)\)/);