{"id":13819802,"url":"https://github.com/glebarez/go-sqlite","last_synced_at":"2025-04-29T23:42:37.695Z","repository":{"id":38415553,"uuid":"437282575","full_name":"glebarez/go-sqlite","owner":"glebarez","description":"pure-Go SQLite driver for Go (SQLite embedded)","archived":false,"fork":false,"pushed_at":"2025-02-14T17:12:04.000Z","size":104970,"stargazers_count":742,"open_issues_count":19,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-29T23:42:29.694Z","etag":null,"topics":["database","driver","go","golang","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glebarez.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-11T12:57:28.000Z","updated_at":"2025-04-28T14:01:55.000Z","dependencies_parsed_at":"2025-03-07T22:33:35.522Z","dependency_job_id":"9802d2f2-6839-46d3-b807-9835fe9d47ad","html_url":"https://github.com/glebarez/go-sqlite","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glebarez%2Fgo-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glebarez%2Fgo-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glebarez%2Fgo-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glebarez%2Fgo-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glebarez","download_url":"https://codeload.github.com/glebarez/go-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251602602,"owners_count":21615957,"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","driver","go","golang","sqlite","sqlite3"],"created_at":"2024-08-04T08:00:53.188Z","updated_at":"2025-04-29T23:42:37.676Z","avatar_url":"https://github.com/glebarez.png","language":"Go","readme":"[![Tests](https://github.com/glebarez/go-sqlite/actions/workflows/tests.yml/badge.svg)](https://github.com/glebarez/go-sqlite/actions/workflows/tests.yml)\n![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/glebarez/0fd7561eb29baf31d5362ffee1ae1702/raw/badge-sqlite-version-with-date.json)\n\n# go-sqlite\nThis is a pure-Go SQLite driver for Golang's native [database/sql](https://pkg.go.dev/database/sql) package.\nThe driver has [Go-based implementation of SQLite](https://gitlab.com/cznic/sqlite) embedded in itself (so, you don't need to install SQLite separately)\n\n# Usage\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"database/sql\"\n\t\"log\"\n\n\t_ \"github.com/glebarez/go-sqlite\"\n)\n\nfunc main() {\n\t// connect\n\tdb, err := sql.Open(\"sqlite\", \":memory:\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// get SQLite version\n\t_ := db.QueryRow(\"select sqlite_version()\")\n}\n```\n\n## Connection string examples\n- in-memory SQLite: ```\":memory:\"```\n- on-disk SQLite: ```\"path/to/some.db\"```\n- Foreign-key constraint activation: ```\":memory:?_pragma=foreign_keys(1)\"```\n\n## Settings PRAGMAs in connection string\nAny SQLIte pragma can be preset for a Database connection using ```_pragma``` query parameter. Examples:\n- [journal mode](https://www.sqlite.org/pragma.html#pragma_journal_mode): ```path/to/some.db?_pragma=journal_mode(WAL)```\n- [busy timeout](https://www.sqlite.org/pragma.html#pragma_busy_timeout): ```:memory:?_pragma=busy_timeout(5000)```\n\nMultiple PRAGMAs can be specified, e.g.:\u003cbr\u003e\n```path/to/some.db?_pragma=busy_timeout(5000)\u0026_pragma=journal_mode(WAL)```\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglebarez%2Fgo-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglebarez%2Fgo-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglebarez%2Fgo-sqlite/lists"}