File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 4
4
< head >
5
5
< meta charset ="utf8 ">
6
6
< title > SQL REPL</ title >
7
- < script src ="../js /sql.js "> </ script >
7
+ < script src ="../dist /sql-wasm .js "> </ script >
8
8
</ head >
9
9
< body >
10
10
< input type ='text ' id ='input ' placeholder ="ENTER SOME SQL " size ='50 '
15
15
< script >
16
16
17
17
//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
+ } ) ;
19
22
20
23
document . getElementById ( 'submit' ) . onclick = function ( ) {
21
24
var sql = document . getElementById ( 'input' ) . value ;
Original file line number Diff line number Diff line change 1
1
< meta charset ="utf8 " />
2
2
< html >
3
- < script src ='../../ dist/sql-wasm-debug.js '> </ script >
3
+ < script src ='../dist/sql-wasm-debug.js '> </ script >
4
4
< script >
5
5
config = {
6
6
locateFile : ( filename , prefix ) => {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ <h2>Examples</h2>
11
11
12
12
< ol >
13
13
< 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 >
14
15
< li > < a href ="./examples/persistent.html "> Persistence</ a > Persisting data</ li >
15
16
< li > < a href ="./examples/requireJS.html "> RequireJS</ a > Load sql.js asynchronously using < a href ="https://requirejs.org/ "> RequireJs</ a > </ li >
16
17
< 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