*
* write readers..
*
- * usage: seed generate.js
+ * usage: seed generate.js
+ *
+ *
+ *
+ *
+ *Hack needed to latest GLib-2.0.gir
+ *
+ * <record name="KeyFile" c:type="GKeyFile" disguised="1">
+ <constructor name="new" c:identifier="g_key_file_new">
+ <return-value transfer-ownership="full">
+ <type name="KeyFile" c:type="GKeyFile*"/>
+ </return-value>
+ </constructor>
+ *
+ *
+ * remove introspectable =0 from g_key_file_get_groups
+ * and add transfer-owneership = none to return value
+ * remove introspectable =0 from g_key_file_get_keys
+ * and add transfer-owneership = none to return value*
*
*/
Gda = imports.gi.Gda;
File = imports.File.File;
Options = imports.Options.Options;
-Gda.init();
+//Gda.init();
var prov = Gda.Config.list_providers ();
//print(prov.dump_as_string());
'time' : 'string', //bogus
'int' : 'int',
'bigint' : 'int',
- 'double' : 'int',
+ 'double' : 'float',
'tinyint' : 'int',
+ 'smallint' : 'int',
'decimal' : 'float',
'float' : 'float',
'char' : 'string',
var groups = key_file.get_groups();
groups.forEach(function(g) {
ini[g] = {}
-
+ print("KEY:"+g);
var keys = key_file.get_keys(g);
- keys.forEach(function(k) {
+ if (!keys) { return; }
+ keys.forEach(function(k) {
ini[g][k] = key_file.get_value(g,k);
})
})
}
}
+
if (File.isDirectory(cfg.INI)) {