{"id":40993237,"url":"https://github.com/leanprover/leansqlite","last_synced_at":"2026-01-22T08:00:42.500Z","repository":{"id":333839675,"uuid":"1131201762","full_name":"leanprover/leansqlite","owner":"leanprover","description":"SQLite bindings for Lean","archived":false,"fork":false,"pushed_at":"2026-01-21T09:10:37.000Z","size":2622,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-21T21:21:51.078Z","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/leanprover.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T16:19:24.000Z","updated_at":"2026-01-21T15:07:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leanprover/leansqlite","commit_stats":null,"previous_names":["david-christiansen/leansqlite"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leanprover/leansqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fleansqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fleansqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fleansqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fleansqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover","download_url":"https://codeload.github.com/leanprover/leansqlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fleansqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28658900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-01-22T08:00:26.420Z","updated_at":"2026-01-22T08:00:42.482Z","avatar_url":"https://github.com/leanprover.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# leansqlite\n\n## Overview\n\nThis library provides Lean bindings for SQLite. The implementation is\nmostly a thin layer around the SQLite C API. The library includes a\nfew conveniences on top of the raw C bindings to make working with\nSQLite more straightforward:\n\n * Interpolated strings that expand to prepared statements\n * Type classes for serializing binary blobs, converting data to query\n   parameters, and reading columns from results\n * Iterators over query result rows\n\n## Key Modules\n\nThe library is organized into three layers:\n\nThe `SQLite.FFI` module contains the raw foreign function interface\nbindings to the SQLite C API, at a very low level of abstraction.\n\nThe `SQLite.LowLevel` module wraps the FFI layer with Lean structures\nand types that make the API more ergonomic while still staying close\nto the underlying C interface. It provides structures for database\nconnections and statements, enumerations for modes and options, and\nhelper functionss. This module is suitable for users who want a\nstraightforward mapping to SQLite concepts without additional\nabstractions.\n\nThe main `SQLite` module builds on the low-level API to provide\nhigher-level conveniences. It includes type classes for binding and\nreading values, a row reader monad for extracting query results,\niterator support for working with result sets, and SQL interpolation\nsyntax for embedding values in queries. These higher-level features\nare more experimental, and the specifics of the API are likely to\nchange.\n\n## SQLite Integration\n\nThe library bundles the SQLite amalgamation and compiles it directly\nalongside the Lean FFI bindings. This means users do not need to have\nSQLite installed on their system, and the library is self-contained.\n\nSQLite is compiled with the following flags:\n * `SQLITE_ENABLE_COLUMN_METADATA` enables the functions that provide\n   metadata about result columns, such as the original table and\n   column names.\n * `SQLITE_DISABLE_LFS` flag disables large file support, due to an\n   incompatibility between C library versions on Linux. On 64-bit\n   systems this has no practical effect, as file sizes are not\n   limited. However, on 32-bit systems it would restrict database\n   files to approximately 2GB. Because of this limitation, the library\n   currently does not support 32-bit platforms. If there is a\n   compelling use case for 32-bit support, the build configuration\n   could be adjusted to work around the large file support issue.\n\n## Development\n\nTo build the library, use the standard Lake build command from the\nrepository root. This will compile both the SQLite amalgamation and\nthe Lean bindings, producing the library and any default targets.\n\n```bash\nlake build\n```\n\nThe library includes a test suite that exercises the FFI bindings and\nhigher-level API. To run the tests, use the `lake test` command. By\ndefault, tests run against a temporary database file that is\nautomatically created and cleaned up.\n\n```bash\nlake test\n```\n\nFor verbose output that shows all passing tests in addition to\nfailures, pass the verbose flag:\n\n```bash\nlake test -- --verbose\n```\n\nIf you need to run tests against a specific database file instead of a\ntemporary one, provide the path as an argument. This can be useful for\ndebugging or inspecting the database state after tests complete.\n\n```bash\nlake test -- path/to/database.db\n```\n\nYou can combine the verbose flag with a custom database path as well:\n\n```bash\nlake test -- --verbose path/to/database.db\n```\n\n## License\n\nThis library is released under the Apache 2.0 license. See the LICENSE\nfile for the complete license text.\n\nThe library bundles SQLite, which is in the public domain. SQLite has\nbeen dedicated to the public domain by its authors and is free for use\nfor any purpose, commercial or private. For more information about\nSQLite's public domain dedication, see the official SQLite copyright\npage at https://www.sqlite.org/copyright.html.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Fleansqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover%2Fleansqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Fleansqlite/lists"}