(commands)
| 28 | |
| 29 | // Run a command in the database |
| 30 | function execute(commands) { |
| 31 | tic(); |
| 32 | worker.onmessage = function(event) { |
| 33 | var results = event.data.results; |
| 34 | toc("Executing SQL"); |
| 35 | |
| 36 | tic(); |
| 37 | outputElm.innerHTML = ""; |
| 38 | for (var i=0; i<results.length; i++) { |
| 39 | outputElm.appendChild(tableCreate(results[i].columns, results[i].values)); |
| 40 | } |
| 41 | toc("Displaying results"); |
| 42 | } |
| 43 | worker.postMessage({action:'exec', sql:commands}); |
| 44 | outputElm.textContent = "Fetching results..."; |
| 45 | } |
| 46 | |
| 47 | // Create an HTML table |
| 48 | var tableCreate = function () { |
no test coverage detected
searching dependent graphs…