Commit 9eaf1c5b authored by Giant's avatar Giant
Browse files

Attempt to reconnect to database if connection is closed.

parent 68d4b88e
......@@ -142,6 +142,10 @@ public class MySQLDriver implements Driver {
@Override
public QueryResult execQuery(Query q) {
if(!this.isConnected()) {
this.connect();
}
Statement st = null;
ArrayList<HashMap<String, String>> data = new ArrayList<HashMap<String, String>>();
......@@ -186,6 +190,10 @@ public class MySQLDriver implements Driver {
@Override
public QueryResult updateQuery(Query q) {
if(!this.isConnected()) {
this.connect();
}
Statement st = null;
if(!q.isParsed()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment