Sqlite3 browser9/5/2023 ![]() ![]() -x, -no-browser: do not open a web-browser when sqlite-web starts.The export tab supports exporting all, or a subset, of columns:īasic INSERT, UPDATE and DELETE queries are supported: There is an option to automatically create columns for any unrecognized keys in the import file: The import tab supports importing CSV and JSON files into a table. The query results are displayed in a table and can be exported to either JSON or CSV: The query tab allows you to execute arbitrary SQL queries on a table. Links in the table header can be used to sort the data: ![]() The content tab displays all the table data. From this page you can also create, rename or drop columns and indexes. The structure tab displays information about the structure of the table, including columns, indexes, triggers, and foreign keys (if any exist). The index page shows some basic information about the database, including the number of tables and indexes, as well as its size on disk: Columns (yes, you can drop and rename columns!).Works with your existing SQLite databases, or can be used to create new databases.If you want to compile your own version of SQLite for WebAssembly, or want to contribute to this project, see CONTRIBUTING.md.$ sqlite_web /path/to/database.db Features (The compiled files are available via the release page.) ![]() General consumers of this library don't need to read any further. See examples/GUI/gui.js for a good example of this. worker.* - Web Worker versions of the above libraries.sql-asm-debug.js : The Debug asm.js version of Sql.js.If you are using sql-asm.js and you see this error ( Cannot enlarge memory arrays), use this file. sql-asm-memory-growth.js : Asm.js doesn't allow for memory to grow by default, because it is slower and de-optimizes.sql-asm.js : The older asm.js version of Sql.js.You will need to include/ship sql-wasm-debug.wasm if you use this. sql-wasm-debug.js : The Web Assembly, Debug version of Sql.js.If you use this, you will need to include/ship sql-wasm.wasm as well. sql-wasm.js : The Web Assembly version of Sql.js.įor each release, you will find a file called sqljs.zip in the release assets. You can always find the latest published artifacts on. You can find these files on our release page Versions of sql.js included in the distributed artifacts wasm file, like sql-wasm.js and sql-wasm.wasm. This could cause errors like Error: near "nothing": syntax error Downloading/Using:Īlthough asm.js files were distributed as a single Javascript file, WebAssembly libraries are most efficiently distributed as a pair of files, the. NOTHING is now a reserved word in SQLite, whereas previously it was not. See this demo of how to integrate sql.js with webpack (and react).Ĭonst initSqlJs = require ( 'sql.js' ) // or if you are in a browser: // const initSqlJs = window.initSqlJs const SQL = await initSqlJs ( ) If you use an asset builder such as webpack, you can automate this. Then use the locateFile property of the configuration object passed to initSqlJs to indicate where the file is. ![]() node_modules/sql.js/dist/sql-wasm.wasm after installing sql.js from npm, and instruct your bundler to add it to your static assets or load it from a CDN. wasm file in addition to the javascript library. Usageīy default, sql.js uses wasm, and thus needs to load a. It is generated from comments inside the source code, and is thus always up to date. API documentationĪ full API documentation for all the available classes and methods is available. SQLite is public domain, sql.js is MIT licensed. A native binding will not only be faster because it will run native code, but it will also be able to work on database files directly instead of having to load the entire database in memory, avoiding out of memory errors and further improving performances. If you are building a native application in JavaScript (using Electron for instance), or are working in node.js, you will likely prefer to use a native binding of SQLite to JavaScript. Sql.js can be used like any traditional JavaScript library. It includes contributed math and string extension functions. Sql.js uses emscripten to compile SQLite to webassembly (or to javascript code for compatibility with older browsers). However, it allows you to import any existing sqlite file, and to export the created database as a JavaScript typed array. It uses a virtual database file stored in memory, and thus doesn't persist the changes made to the database. It allows you to create a relational database and query it entirely in the browser. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |