MCPcopy Create free account
hub / github.com/sql-js/sql.js / savedb

Function savedb

GUI/gui.js:118–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117// Save the db to a file
118function savedb () {
119 worker.onmessage = function(event) {
120 toc("Exporting the database");
121 var arraybuff = event.data.buffer;
122 var blob = new Blob([arraybuff]);
123 var a = document.createElement("a");
124 a.href = window.URL.createObjectURL(blob);
125 a.download = "sql.db";
126 a.onclick = function() {
127 setTimeout(function() {
128 window.URL.revokeObjectURL(a.href);
129 }, 1500);
130 };
131 a.click();
132 };
133 tic();
134 worker.postMessage({action:'export'});
135}
136savedbElm.addEventListener("click", savedb, true);

Callers

nothing calls this directly

Calls 2

tocFunction · 0.70
ticFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…