File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 44 < head >
55 < meta charset ="utf8 ">
66 < title > SQL REPL</ title >
7- < script src ="../js /sql.js "> </ script >
7+ < script src ="../dist /sql-wasm .js "> </ script >
88 </ head >
99 < body >
1010 < input type ='text ' id ='input ' placeholder ="ENTER SOME SQL " size ='50 '
1515 < script >
1616
1717//Open a blank database
18- var db = new SQL . Database ( ) ;
18+ var db ;
19+ initSqlJs ( { locateFile : filename => `../dist/${ filename } ` } ) . then ( function ( SQL ) {
20+ db = new SQL . Database ( ) ;
21+ } ) ;
1922
2023document . getElementById ( 'submit' ) . onclick = function ( ) {
2124 var sql = document . getElementById ( 'input' ) . value ;
Original file line number Diff line number Diff line change 11< meta charset ="utf8 " />
22< html >
3- < script src ='../../ dist/sql-wasm-debug.js '> </ script >
3+ < script src ='../dist/sql-wasm-debug.js '> </ script >
44 < script >
55 config = {
66 locateFile : ( filename , prefix ) => {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ <h2>Examples</h2>
1111
1212< ol >
1313 < li > < a href ="./examples/GUI "> Online SQL Interpreter</ a > Full featured Sqlite Interpreter running in your browser.</ li >
14+ < li > < a href ="./examples/repl.html "> Online SQL read eval print loop</ a > simple SQLite REPL </ li >
1415 < li > < a href ="./examples/persistent.html "> Persistence</ a > Persisting data</ li >
1516 < li > < a href ="./examples/requireJS.html "> RequireJS</ a > Load sql.js asynchronously using < a href ="https://requirejs.org/ "> RequireJs</ a > </ li >
1617 < li > < a href ="./examples/simple.html "> Simple Example</ a > Demonstrates prepare,getAsObject, and other SQL.js methods. </ li >
You can’t perform that action at this time.
0 commit comments