You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ There are no C bindings or node-gyp compilation here, sql.js is a simple javascr
9
9
10
10
SQLite is public domain, sql.js is MIT licensed.
11
11
12
-
Sql.js predates WebAssembly, and thus started as an [asm.js](https://en.wikipedia.org/wiki/Asm.js) project. It still supports asm.js for backwards compatability.
12
+
Sql.js predates WebAssembly, and thus started as an [asm.js](https://en.wikipedia.org/wiki/Asm.js) project. It still supports asm.js for backwards compatibility.
13
13
14
14
## Version of binaries
15
15
Sql.js was last built with:
@@ -22,7 +22,7 @@ A [full documentation](http://kripken.github.io/sql.js/documentation/#http://kri
22
22
## Usage
23
23
24
24
```javascript
25
-
var initSqlJs =require('sql-wasm.js');
25
+
var initSqlJs =require('sql.js');
26
26
// or if you are in a browser:
27
27
//var initSqlJs = window.initSqlJs;
28
28
@@ -114,12 +114,12 @@ The test files provide up to date example of the use of the api.
114
114
});
115
115
</script>
116
116
<body>
117
-
Output is in Javscript console
117
+
Output is in Javascript console
118
118
</body>
119
119
</html>
120
120
```
121
121
122
-
#### Creating a database from a file choosen by the user
122
+
#### Creating a database from a file chosen by the user
123
123
`SQL.Database` constructor takes an array of integer representing a database file as an optional parameter.
124
124
The following code uses an HTML input as the source for loading a database:
`NOTHING` is now a reserved word in SQLite, whereas previously it was not. This could cause errors like `Error: near "nothing": syntax error`
264
264
265
265
### Downloading/Using: ###
266
-
Although asm.js files were distributed as a single Javascript file, WebAssembly libraries are most efficiently distributed as a pair of files, the `.js` loader and the `.wasm` file, like [dist/sql-wasm.js]([dist/sql-wasm.js]) and [dist/sql-wasm.wasm]([dist/sql-wasm.wasm]). The `.js` file is reponsible for wrapping/loading the `.wasm` file.
266
+
Although asm.js files were distributed as a single Javascript file, WebAssembly libraries are most efficiently distributed as a pair of files, the `.js` loader and the `.wasm` file, like [dist/sql-wasm.js]([dist/sql-wasm.js]) and [dist/sql-wasm.wasm]([dist/sql-wasm.wasm]). The `.js` file is responsible for wrapping/loading the `.wasm` file.
267
267
268
268
269
269
270
270
271
271
## Versions of sql.js included in `dist/`
272
272
-`sql-wasm.js` : The Web Assembly version of Sql.js. Minified and suitable for production. Use this. If you use this, you will need to include/ship `sql-wasm.wasm` as well.
273
273
-`sql-wasm-debug.js` : The Web Assembly, Debug version of Sql.js. Larger, with assertions turned on. Useful for local development. You will need to include/ship `sql-wasm-debug.wasm` if you use this.
274
-
-`sql-asm.js` : The older asm.js version of Sql.js. Slower and larger. Provided for compatiblity reasons.
274
+
-`sql-asm.js` : The older asm.js version of Sql.js. Slower and larger. Provided for compatibility reasons.
275
275
-`sql-asm-memory-growth.js` : Asm.js doesn't allow for memory to grow by default, because it is slower and de-optimizes. If you are using sql-asm.js and you see this error (`Cannot enlarge memory arrays`), use this file.
276
276
-`sql-asm-debug.js` : The _Debug_ asm.js version of Sql.js. Use this for local development.
277
277
-`worker.*` - Web Worker versions of the above libraries. More limited API. See [examples/GUI/gui.js](examples/GUI/gui.js) for a good example of this.
0 commit comments