{"id":13841988,"url":"https://github.com/zombiezen/go-sqlite","last_synced_at":"2025-04-13T23:49:53.544Z","repository":{"id":38476429,"uuid":"352225715","full_name":"zombiezen/go-sqlite","owner":"zombiezen","description":"Low-level Go interface to SQLite 3","archived":false,"fork":false,"pushed_at":"2025-03-10T00:34:09.000Z","size":6693,"stargazers_count":864,"open_issues_count":9,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-06T21:06:21.303Z","etag":null,"topics":["database","golang","golang-library","golang-package","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/zombiezen.com/go/sqlite","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zombiezen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"zombiezen"}},"created_at":"2021-03-28T02:42:52.000Z","updated_at":"2025-04-05T05:12:23.000Z","dependencies_parsed_at":"2023-12-06T01:25:21.043Z","dependency_job_id":"4fab3aa2-f54a-4655-906a-620545d5b46e","html_url":"https://github.com/zombiezen/go-sqlite","commit_stats":{"total_commits":302,"total_committers":23,"mean_commits":"13.130434782608695","dds":0.5,"last_synced_commit":"d4dcb01dc409c5ebfba92092d1dd605296ea7664"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fgo-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fgo-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fgo-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fgo-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zombiezen","download_url":"https://codeload.github.com/zombiezen/go-sqlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799901,"owners_count":21163400,"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":["database","golang","golang-library","golang-package","sqlite","sqlite3"],"created_at":"2024-08-04T17:01:25.444Z","updated_at":"2025-04-13T23:49:53.516Z","avatar_url":"https://github.com/zombiezen.png","language":"Go","readme":"# `zombiezen.com/go/sqlite`\n\n[![Go Reference](https://pkg.go.dev/badge/zombiezen.com/go/sqlite.svg)][reference docs]\n\nThis package provides a low-level Go interface to [SQLite 3][].\nIt is a fork of [`crawshaw.io/sqlite`][] that uses [`modernc.org/sqlite`][],\na CGo-free SQLite package.\nIt aims to be a mostly drop-in replacement for `crawshaw.io/sqlite`.\n\nThis package deliberately does not provide a `database/sql` driver.\nSee [David Crawshaw's rationale][] for an in-depth explanation.\nIf you want to use `database/sql` with SQLite without CGo,\nuse `modernc.org/sqlite` directly.\n\n[`crawshaw.io/sqlite`]: https://github.com/crawshaw/sqlite\n[David Crawshaw's rationale]: https://crawshaw.io/blog/go-and-sqlite\n[`modernc.org/sqlite`]: https://pkg.go.dev/modernc.org/sqlite\n[reference docs]: https://pkg.go.dev/zombiezen.com/go/sqlite\n[SQLite 3]: https://sqlite.org/\n\n## Features\n\n- Full SQLite functionality via `modernc.org/sqlite`,\n  an automatically generated translation of the original C source code of SQLite into Go\n- Builds with `CGO_ENABLED=0`,\n  allowing cross-compiling and data race detection\n- Allows access to SQLite-specific features\n  like [blob I/O][] and [user-defined functions][]\n- Includes a simple [schema migration package][]\n- Utilities for [running embedded SQL scripts][ExecScriptFS] using the\n  [Go 1.16 embedding feature][]\n- A [`go fix`-like tool][migration docs] for migrating existing code using\n  `crawshaw.io/sqlite`\n- A [simple REPL][] for debugging\n\n[blob I/O]: https://pkg.go.dev/zombiezen.com/go/sqlite#Blob\n[ExecScriptFS]: https://pkg.go.dev/zombiezen.com/go/sqlite/sqlitex#ExecScriptFS\n[Go 1.16 embedding feature]: https://pkg.go.dev/embed\n[migration docs]: cmd/zombiezen-sqlite-migrate/README.md\n[schema migration package]: https://pkg.go.dev/zombiezen.com/go/sqlite/sqlitemigration\n[simple REPL]: https://pkg.go.dev/zombiezen.com/go/sqlite/shell\n[user-defined functions]: https://pkg.go.dev/zombiezen.com/go/sqlite#Conn.CreateFunction\n\n## Install\n\n```shell\ngo get zombiezen.com/go/sqlite\n```\n\nWhile this library does not use CGo,\nmake sure that you are building for one of the [supported architectures][].\n\n[supported architectures]: https://pkg.go.dev/modernc.org/sqlite#hdr-Supported_platforms_and_architectures\n\n## Getting Started\n\n```go\nimport (\n  \"fmt\"\n\n  \"zombiezen.com/go/sqlite\"\n  \"zombiezen.com/go/sqlite/sqlitex\"\n)\n\n// ...\n\n// Open an in-memory database.\nconn, err := sqlite.OpenConn(\":memory:\", sqlite.OpenReadWrite)\nif err != nil {\n  return err\n}\ndefer conn.Close()\n\n// Execute a query.\nerr = sqlitex.ExecuteTransient(conn, \"SELECT 'hello, world';\", \u0026sqlitex.ExecOptions{\n  ResultFunc: func(stmt *sqlite.Stmt) error {\n    fmt.Println(stmt.ColumnText(0))\n    return nil\n  },\n})\nif err != nil {\n  return err\n}\n```\n\nIf you're creating a new application,\nsee the [package examples][] or the [reference docs][].\n\nIf you're looking to switch existing code that uses `crawshaw.io/sqlite`,\ntake a look at the [migration docs][].\n\n[package examples]: https://pkg.go.dev/zombiezen.com/go/sqlite#pkg-examples\n\n## License\n\n[ISC](LICENSE)\n","funding_links":["https://github.com/sponsors/zombiezen"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzombiezen%2Fgo-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzombiezen%2Fgo-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzombiezen%2Fgo-sqlite/lists"}