diff --git a/frontend-hyrise/hyrise-sql-connector.js b/frontend-hyrise/hyrise-sql-connector.js index f63e917..55ba67e 100644 --- a/frontend-hyrise/hyrise-sql-connector.js +++ b/frontend-hyrise/hyrise-sql-connector.js @@ -14,6 +14,7 @@ HyriseSqlConnector.prototype.setConnectionDetails = function(host, port) { return this; }; + HyriseSqlConnector.prototype.executeQuery = function(query, callback, error_callback) { var endpoint = 'http://' + this._host + ':' + this._port + '/query'; var url = encodeURI(endpoint); diff --git a/frontend-hyrise/index.html b/frontend-hyrise/index.html index 931a293..55752c2 100644 --- a/frontend-hyrise/index.html +++ b/frontend-hyrise/index.html @@ -43,6 +43,7 @@
+

Performance Data

@@ -61,6 +62,7 @@
+

Results (first 100 rows)

@@ -126,14 +128,22 @@ $(function() { updatePerformanceData(result); }, function(xhr, status, error) { console.log(arguments); + var msg = xhr.responseJSON.error[0]; // On Error - $('#resultTable').html('Error when executing query (' + status + ', ' + xhr.status + ' ' + error + ')'); + $('#resultTable').html('Error when executing query (' + status + ', ' + msg + ')'); $('#performanceDataTable tbody').html(''); - }); }); - addSampleQuery('SELECT 1', 'SELECT name, city, grade FROM students WHERE grade <= 2.0;') + $('#queryInput').keypress(function(evt) { + if (evt.keyCode == 13 && evt.shiftKey) { + $('#submitBtn').click(); + return false; + } + return true; + }); + + addSampleQuery('IMPORT & SELECT', 'IMPORT FROM TBL FILE \'test/students.tbl\' INTO students;\nSELECT name, city, grade FROM students WHERE grade <= 2.0;') addSampleQuery('SELECT 2', 'SELECT name, city, grade FROM (SELECT * FROM students WHERE city = \'Potsdam\') t1 WHERE grade <= 1.5 OR grade >= 3.5;'); addSampleQuery('COMMENT & LIKE', '-- test\nSELECT * FROM students WHERE city LIKE \'B.*\'\n-- comment'); addSampleQuery('JOIN', 'SELECT * FROM students t1 JOIN students t2 ON t1.student_number = t2.student_number'); diff --git a/src/lib/Expr.cpp b/src/lib/Expr.cpp index 1aceca9..8110afb 100644 --- a/src/lib/Expr.cpp +++ b/src/lib/Expr.cpp @@ -86,10 +86,10 @@ Expr* Expr::makeFunctionRef(char* func_name, Expr* expr) { } Expr::~Expr() { - delete expr; - delete expr2; - delete name; - delete table; + // delete expr; + // delete expr2; + // delete name; + // delete table; } } // namespace hsql \ No newline at end of file