this.project = project;
this.DBTYPE = this.project.get_string_member("DBTYPE");
this.DBNAME = this.project.get_string_member("DBNAME");
+ if (this.DBTYPE.length < 1) {
+ return;
+ }
+
+
try {
this.cnc = Gda.Connection.open_from_string (
Gda.ConnectionOptions.NONE
);
} catch(Gda.ConfigError e) {
- print("%s\n", e.message);
+ GLib.warning("%s\n", e.message);
this.cnc = null;
this.DBTYPE = "";
} catch(Gda.ConnectionError e) {
- print("%s\n", e.message);
+ GLib.warning("%s\n", e.message);
this.cnc = null;
this.DBTYPE = "";
}
if (this.DBTYPE == "MySQL") {
return this.fetchAll(this.cnc.execute_select_command( "SHOW TABLES" ));
}
- print("Read tables failed DBTYPE = %s\n", this.DBTYPE);
+ GLib.warning("Read tables failed DBTYPE = %s\n", this.DBTYPE);
return new Json.Array();
}
}
var contents = jarr.get_string_element(0);
- print(contents);
+ GLib.debug(contents);
+ if (contents == null) {
+ return ret;
+ }
GLib.Regex exp = /FK\(([^\)]+)\)/;
string str = "";
if ( exp.match (contents, 0, out mi) ) {
str = mi.fetch(1);
- print("match = %s", str);
+ GLib.debug("match = %s", str);
}
} catch (GLib.Error e) {
return ret;