var cfg = o.parse(Seed.argv);
-print(JSON.stringify(cfg, null,4));
+print(JSON.(cfg, null,4));
var cnc = Gda.Connection.open_from_string (cfg.DBTYPE,
"DB_NAME=" + cfg.DBNAME,
for (var i =0;i < this.get_n_columns(); i++) {
cols.push(this.get_column_name(i));
}
- //print(JSON.stringify(cols, null,4));
+ //print(JSON.(cols, null,4));
var iter = this.create_iter();
var res = [];
//print(this.get_n_rows());
var groups = key_file.get_groups();
groups.forEach(function(g) {
- print("KEY:"+g);
+ //print("KEY:"+g);
ini[g] = {}
var keys = key_file.get_keys(g);
print("GET val: " + k);
ini[g][k] = key_file.get_value(g,k);
print(ini[g][k] );
- })
- })
-
+ });
+ //print("DONE KEY:"+g);
+ });
+ //print("DONE KEYS");
}
- print("DONE KEYS");
+
if (File.isFile(cfg.INI)) {
if (cfg.INI.match(/links\.ini$/)) {
readIni(cfg.INI);
}
-//print(JSON.stringify(ini, null,4));
+//print(JSON.(ini, null,4));
//console.dump(ini);
-
+print("DONE INI");
//Seed.quit();
break;
default:
- throw "Invalid data base type " + cfg.DBTYPE + " should be MySQL or PostgreSQL";
+ throw {
+ name: "ArgumentError",
+ message: "Invalid data base type " + cfg.DBTYPE + " should be MySQL or PostgreSQL"
+ };
+
/*
"Field": "province",
"Type": "varchar(255)",
var tables = cnc.execute_select_command( query_tables).fetchAll();
-print(JSON.stringify(tables));
+print(JSON.(tables));
var readers = [];
tables.forEach(function(table) {
var firstTxtCol = '';
- //print(JSON.stringify(schema, null,4)); Seed.quit();
+ //print(JSON.(schema, null,4)); Seed.quit();
schema.forEach(function(e) {
e.Type = e.Type || e.type;
'id' : 'id',
'root' : 'data',
'totalProperty' : 'total',
- '|fields' : JSON.stringify(combofields)
+ '|fields' : JSON.(combofields)
}
]
- //print(JSON.stringify(reader,null,4));
+ //print(JSON.(reader,null,4));
readers.push({
table : table ,
combo : combo,
combofields : combofields,
reader : reader,
- oreader : JSON.parse(JSON.stringify(reader)), // dupe it..
+ oreader : JSON.parse(JSON.(reader)), // dupe it..
colmodel : colmodel,
firstTxtCol : firstTxtCol,
form : form
continue;
}
if (typeof(reader.form[col]) == 'undefined') {
- print (JSON.stringify(reader.form, null,4));
+ print (JSON.(reader.form, null,4));
print("missing linked column " + col);
continue;
}
var combofields_name = add.combofields[1].name;
var old = reader.form[col];
- reader.form[col] = JSON.parse(JSON.stringify(add.combo)); // clone
+ reader.form[col] = JSON.parse(JSON.(add.combo)); // clone
reader.form[col].queryParam = 'query[' + combofields_name + ']';// SET WHEN USED
reader.form[col].fieldLabel = old.fieldLabel; // SET WHEN USED
reader.form[col].hiddenName = old.name; // SET WHEN USED eg. project_id
-//print(JSON.stringify(readers, null, 4));
+//print(JSON.(readers, null, 4));
readers.forEach(function(reader) {
'*prop' : "reader",
id : 'id', // maybe no..
- '|fields' : JSON.stringify(reader.reader, null,4).replace(/"/g,"'")
+ '|fields' : JSON.(reader.reader, null,4).replace(/"/g,"'")
};
File.write(
dir + '/' + cfg.DBNAME + '_' + reader.table + '.json',
- JSON.stringify(jreader, null, 4)
+ JSON.(jreader, null, 4)
)
dir + '/' + cfg.DBNAME + '_' + reader.table + '.json',
- JSON.stringify({
+ JSON.({
'|xns' : 'Roo',
xtype : "GridPanel",
"title": reader.table,
dir + '/' + cfg.DBNAME + '_' + reader.table + '.json',
- JSON.stringify( frmCfg, null, 4)
+ JSON.( frmCfg, null, 4)
);
dir + '/' + cfg.DBNAME + '_' + reader.table + '.json',
- JSON.stringify(reader.combo, null, 4)
+ JSON.(reader.combo, null, 4)
);
dir + '/' + cfg.DBNAME + '_' + reader.table + '.json',
- JSON.stringify({
+ JSON.({
"closable": false,
"collapsible": false,