{"id":22862409,"url":"https://github.com/dylibso/sqlite-zero","last_synced_at":"2026-02-02T18:37:12.391Z","repository":{"id":239500267,"uuid":"799693794","full_name":"dylibso/sqlite-zero","owner":"dylibso","description":"A pure JVM, zero native dependeny libsqlite powered by Wasm \u0026 Chicory","archived":false,"fork":false,"pushed_at":"2024-07-19T15:25:34.000Z","size":3845,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-28T01:03:00.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylibso.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-12T22:11:07.000Z","updated_at":"2024-08-14T14:30:51.000Z","dependencies_parsed_at":"2024-05-12T23:24:56.942Z","dependency_job_id":"e7bbfb0f-eb5d-4d64-beab-972676b11689","html_url":"https://github.com/dylibso/sqlite-zero","commit_stats":null,"previous_names":["dylibso/sqlite-zero"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dylibso/sqlite-zero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fsqlite-zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fsqlite-zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fsqlite-zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fsqlite-zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylibso","download_url":"https://codeload.github.com/dylibso/sqlite-zero/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fsqlite-zero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29017602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:20:26.228Z","status":"ssl_error","status_checked_at":"2026-02-02T18:20:25.361Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-12-13T10:13:28.296Z","updated_at":"2026-02-02T18:37:12.375Z","avatar_url":"https://github.com/dylibso.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlite-zero\n\nThis is an example of a pure JVM sqlite library using [Chicory](https://github.com/dylibso/chicory).\n\n\u003e **Note**: This is just an experiment at the moment, but if you're interested in helping complete the sqlite API we'd be willing\n\u003e to publish and maintain it.\n\n## Why do this?\n\nMuch of the motivation is outlined in [Chicory's README](https://github.com/dylibso/chicory/tree/main?tab=readme-ov-file#development),\nthe short answer is so that we can run the official sqlite codebase, without ever leaving the JVM, and without asking\nour users to install a dependency. It has zero native dependencies.\n\n## The API\n\nSuppose we are looking at the [iris.db](https://github.com/davidjamesknight/SQLite_databases_for_learning_data_science) dataset.\nLet's query some observations from this database. See [App.java](src/main/java/com/dylibso/sqlitezero/App.java) for running example.\n\n```java\nvar databasePath = Path.of(\"/Users/ben/Code/sqlite-dbs/iris.db\");\nvar db = new Database(databasePath).open();\nvar results = new SqlResults\u003cFlower\u003e();\nvar sql = \" SELECT \\n\" +\n        \"     O.petal_length, \\n\" +\n        \"     O.petal_width, \\n\" +\n        \"     O.sepal_length, \\n\" +\n        \"     O.sepal_width, \\n\" +\n        \"     S.species\\n\" +\n        \"     FROM Observation AS O\\n\" +\n        \"     JOIN Species AS S ON S.species_id = O.species_id LIMIT 3\";\ndb.exec(sql, results);\n\nvar flowers = results.cast(Flower.class);\n\nfor (var f : flowers) {\n    System.out.println(f);\n}\n```\n\nRunning this yields:\n\n```\nFlower[species=setosa,petal_length=1.4,petal_width=0.2,sepal_length=5.1,sepal_width=3.5]\nFlower[species=setosa,petal_length=1.4,petal_width=0.2,sepal_length=4.9,sepal_width=3.0]\nFlower[species=setosa,petal_length=1.3,petal_width=0.2,sepal_length=4.7,sepal_width=3.2]\n```\n\nAssuming we have a `Flower` class like this to capture the results:\n\n```java\nclass Flower {\n    public float petal_length;\n    public float petal_width;\n    public float sepal_length;\n    public float sepal_width;\n    public String species;\n    public String toString() {\n        return \"Flower[species=\"+species+\",petal_length=\"+petal_length+\",petal_width=\"+petal_width+\",sepal_length=\"+sepal_length+\",sepal_width=\"+sepal_width+\"]\";\n    }\n}\n```\n\n## Speed Tip\n\nTo make the AOT runtime a little faster, try setting this option:\n\n```\nexport MAVEN_OPTS=\"-XX:-DontCompileHugeMethods\"\n```\n\n## Compiling\n\nThis package uses [maven](https://maven.apache.org/).\nYou need [wasi-sdk](https://github.com/WebAssembly/wasi-sdk) on your machine.\nThe makefile assumes it's located at `/opt/wasi-sdk`.\n\n```\nmake build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylibso%2Fsqlite-zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylibso%2Fsqlite-zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylibso%2Fsqlite-zero/lists"}