{"id":15041237,"url":"https://github.com/fuse-modules/fuse-sqlite","last_synced_at":"2025-10-07T21:30:55.741Z","repository":{"id":57243295,"uuid":"273895888","full_name":"fuse-modules/fuse-sqlite","owner":"fuse-modules","description":"Library to use SQLite in Fuse.","archived":false,"fork":true,"pushed_at":"2020-08-02T22:03:00.000Z","size":1861,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-04T08:17:42.876Z","etag":null,"topics":["databases","fuse","sqlite"],"latest_commit_sha":null,"homepage":"https://www.sqlite.org/","language":"Uno","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bolav/fuse-sqlite","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuse-modules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-21T12:03:05.000Z","updated_at":"2021-04-12T15:56:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fuse-modules/fuse-sqlite","commit_stats":null,"previous_names":["fuse-open/fuse-sqlite"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-modules%2Ffuse-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-modules%2Ffuse-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-modules%2Ffuse-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-modules%2Ffuse-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuse-modules","download_url":"https://codeload.github.com/fuse-modules/fuse-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235656464,"owners_count":19024770,"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":["databases","fuse","sqlite"],"created_at":"2024-09-24T20:45:47.743Z","updated_at":"2025-10-07T21:30:55.296Z","avatar_url":"https://github.com/fuse-modules.png","language":"Uno","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fuse SQLite bindings\n====================\n\n[![NPM package](https://img.shields.io/npm/v/fuse-sqlite.svg?style=flat-square)](https://www.npmjs.com/package/fuse-sqlite)\n[![License: MIT](https://img.shields.io/github/license/fuse-open/fuse-sqlite.svg?style=flat-square)](LICENSE)\n\nLibrary to use [SQLite](https://www.sqlite.org/) in [Fuse](https://fuseopen.com/).\n\nCurrently supports `ios`, `android` and `dotnet` (Fuse Preview).\n\nIssues, feature requests and pull requests are welcome.\n\n## Install\n\n    $ npm install fuse-sqlite\n\nUsing [fusepm](https://github.com/bolav/fusepm) (legacy)\n\n    $ fusepm install https://github.com/fuse-open/fuse-sqlite\n\n## Usage\n\n\u003e Check out the [example app](example/) for a complete project using TypeScript.\n\n### UX\n\n```xml\n\u003cSQLite ux:Global=\"SQLite\" /\u003e`\n```\n\n### JS or TypeScript\n\n```js\nimport sqlite from \"SQLite\";\n```\n\n```js\nconst db = sqlite.open(\"file.sqlite\");\ndb.execute(\"create table if not exists ids (id integer primary key)\");\ndb.execute(\"insert into ids values (?)\", 2);\nconst r = db.query(\"select * from ids\");\nconsole.log(JSON.stringify(r));\n```\n\nIt returns an array:\n```js\n[\n    {\"field1\": \"value1\", \"field2\": \"value2\"},\n    {\"field1\": \"value1\", \"field2\": \"value2\"}\n]\n```\n\nAPI\n---\n\n### import\n\n```js\nimport sqlite from \"SQLite\";\n```\n\n### require (legacy)\n\n```js\nconst sqlite = require('SQLite');\n```\n\n### sqlite.open\n\nOpens a file that contains a SQLite database\n\n```js\nconst db = sqlite.open(filename);\n```\n\n### sqlite.openFromBundle\n\nOpens a file that contains a SQLite database, possibly from the bundle\n\n```js\nconst db = sqlite.openFromBundle(filename);\n```\n\nAnd in the `unoproj`:\n\n```json\n\"Packages\": [\n  \"Fuse\",\n  \"FuseJS\",\n  \"SQLite\"\n],\n\"Includes\": [\n  \"*.ts\",\n  \"*.ux\",\n  \"bundle.sqlite:Bundle\"\n]\n```\n\n### db.execute\n\nExecutes a query. Does not return anything.\n\n```js\ndb.execute(sql_statement);\ndb.execute(sql_statement, var1, var2, var3);\n```\n\n### db.query\n\nExecutes a query. Returns an array of hashes with the result.\n\n```js\nconst result = db.query(sql_statement);\nconst result = db.query(sql_statement, var1, var2, var3);\n```\n\n### db.prepare\n\nPrepares a query. Returns a prepared statement.\n\n```js\nconst statement = db.prepare(sql_statement);\nstatement.execute(var1, var2, var3);\n```\n\n### db.close\n\nCloses the database.\n\n```js\ndb.close();\n```\n\n## Possible future functionality\n\n* Cursor support\n* Async support\n* Bundled pre-made databases\n\n## Known Issues\n\n* Error messages is a bit different between the targets\n\n## Windows\n\n* The sqlite3.dll is downloaded from http://www.sqlite.org/download.html\n* Mono.Data.Sqlite.dll is included from Mono.\n\n## Troubleshooting\n\n* `Failed to load assembly . . . have caused the assembly to be sandboxed . . .`\n\n    You need to Unblock dll's that you downloaded.\n\n    * https://navbis.wordpress.com/2014/03/17/what-to-do-if-the-dll-assemblies-are-blocked-by-windows/\n    * http://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuse-modules%2Ffuse-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuse-modules%2Ffuse-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuse-modules%2Ffuse-sqlite/lists"}