{"id":13726932,"url":"https://github.com/dyedgreen/deno-sqlite","last_synced_at":"2025-04-07T08:11:22.851Z","repository":{"id":37392096,"uuid":"226982022","full_name":"dyedgreen/deno-sqlite","owner":"dyedgreen","description":"Deno SQLite module","archived":false,"fork":false,"pushed_at":"2024-10-05T14:48:49.000Z","size":30011,"stargazers_count":418,"open_issues_count":18,"forks_count":38,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-31T07:02:26.153Z","etag":null,"topics":["browser","database","deno","deno-sqlite","docs-deno","javascript","sqlite3","typescript","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://deno.land/x/sqlite","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyedgreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-09T22:41:56.000Z","updated_at":"2025-03-15T01:28:03.000Z","dependencies_parsed_at":"2024-11-19T23:48:18.496Z","dependency_job_id":null,"html_url":"https://github.com/dyedgreen/deno-sqlite","commit_stats":{"total_commits":273,"total_committers":21,"mean_commits":13.0,"dds":"0.29670329670329665","last_synced_commit":"c7d4365adb3a8aceb4a0c6077dc0d274addcea8b"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fdeno-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fdeno-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fdeno-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fdeno-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyedgreen","download_url":"https://codeload.github.com/dyedgreen/deno-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615375,"owners_count":20967184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","database","deno","deno-sqlite","docs-deno","javascript","sqlite3","typescript","wasm","webassembly"],"created_at":"2024-08-03T01:03:31.934Z","updated_at":"2025-04-07T08:11:22.820Z","avatar_url":"https://github.com/dyedgreen.png","language":"TypeScript","readme":"# Deno SQLite Module\n\n[![test status](https://github.com/dyedgreen/deno-sqlite/workflows/tests/badge.svg?branch=master)](https://github.com/dyedgreen/deno-sqlite/actions)\n[![deno doc](https://doc.deno.land/badge.svg)](https://deno.land/x/sqlite/mod.ts)\n\nThis is an SQLite module for JavaScript and TypeScript. The wrapper is targeted\nat [Deno](https://deno.land) and uses a version of SQLite3 compiled to\nWebAssembly (WASM). This module focuses on correctness, ease of use and\nperformance.\n\nThis module guarantees API compatibility according to\n[semantic versioning](https://semver.org). Please report any issues you\nencounter. Note that the `master` branch might contain new or breaking features.\nThe versioning guarantee applies only to\n[tagged releases](https://github.com/dyedgreen/deno-sqlite/releases).\n\nThis module relies on filesystem APIs stabilized in Deno v1.44. To use it with\nearlier Deno versions, you must pass the `--unstable-fs` flag when running your\napplication.\n\n## Documentation\n\nDocumentation is available [Deno Docs](https://deno.land/x/sqlite). There is\nalso a list of examples in the [`examples`](./examples) folder.\n\n## Example\n\n```javascript\nimport { DB } from \"https://deno.land/x/sqlite/mod.ts\";\n\n// Open a database\nconst db = new DB(\"test.db\");\ndb.execute(`\n  CREATE TABLE IF NOT EXISTS people (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    name TEXT\n  )\n`);\n\n// Run a simple query\nfor (const name of [\"Peter Parker\", \"Clark Kent\", \"Bruce Wayne\"]) {\n  db.query(\"INSERT INTO people (name) VALUES (?)\", [name]);\n}\n\n// Print out data in table\nfor (const [name] of db.query(\"SELECT name FROM people\")) {\n  console.log(name);\n}\n\n// Close connection\ndb.close();\n```\n\n## Comparison to Plugin based Modules\n\n### TL;DR\n\nIf you want something that just works (and is fast), use this library.\n\nDepending on your specific needs, there is also\n[sqlite3](https://github.com/denodrivers/sqlite3), however using that module\nrequires the `--allow-ffi` and `--unstable` flags, which means the database\nconnection may bypass e.g. file access permissions.\n\n### Advantages\n\n- Security: benefit from Denos security settings, without the need to trust a\n  third party\n- Portability: runs everywhere Deno runs and can even run in the browser\n- Ease of Use: takes full advantage of Denos module cache and does not require\n  any network access after initial download\n- Speed: thanks to WASM, the database performance is comparable to native\n  bindings in most situations and the API is carefully designed to provide\n  optimal performance\n\n### Disadvantages\n\n- Weaker Persistence Guarantees: due to limitations in Denos file system APIs,\n  SQLite can't acquire file locks or memory map files (e.g. this module does not\n  support WAL mode)\n\n## Browser Version (Experimental)\n\nThere is **experimental** support for using `deno-sqlite` in the browser. You\ncan generate a browser compatible module by running:\n\n```bash\ndeno bundle --import-map browser/import_map.json browser/mod.ts [output_bundle_path]\n```\n\nThe modules documentation can be seen by running\n\n```bash\ndeno doc browser/mod.ts\n```\n\nDatabases created in the browser are persisted using\n[indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API).\n\n## Users\n\n- [cotton](https://github.com/rahmanfadhil/cotton)\n- [deno-nessie](https://github.com/halvardssm/deno-nessie)\n- [denodb](https://github.com/eveningkid/denodb)\n- [denolib/typeorm](https://github.com/denolib/typeorm)\n- [kysely-deno-sqlite](https://gitlab.com/soapbox-pub/kysely-deno-sqlite)\n- [small-orm-sqlite](https://github.com/enimatek-nl/small-orm-sqlite)\n\n_(listed in alphabetical order, please submit a PR if you are using this library\nand are not included)_\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyedgreen%2Fdeno-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyedgreen%2Fdeno-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyedgreen%2Fdeno-sqlite/lists"}