{"id":16179711,"url":"https://github.com/mikeblum/sqlite-koans","last_synced_at":"2025-04-07T11:45:39.967Z","repository":{"id":76116232,"uuid":"591834992","full_name":"mikeblum/sqlite-koans","owner":"mikeblum","description":"code for SQLite Koans post","archived":false,"fork":false,"pushed_at":"2023-01-29T18:06:10.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T14:40:57.105Z","etag":null,"topics":["database","golang","sqlite","sqlite3","template-project"],"latest_commit_sha":null,"homepage":"https://mblum.me/2023/01/sqlite-koans","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeblum.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}},"created_at":"2023-01-22T02:38:26.000Z","updated_at":"2024-07-09T18:01:15.000Z","dependencies_parsed_at":"2023-07-11T04:33:42.077Z","dependency_job_id":null,"html_url":"https://github.com/mikeblum/sqlite-koans","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeblum%2Fsqlite-koans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeblum%2Fsqlite-koans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeblum%2Fsqlite-koans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeblum%2Fsqlite-koans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeblum","download_url":"https://codeload.github.com/mikeblum/sqlite-koans/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648923,"owners_count":20972942,"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","sqlite","sqlite3","template-project"],"created_at":"2024-10-10T05:43:49.708Z","updated_at":"2025-04-07T11:45:39.935Z","avatar_url":"https://github.com/mikeblum.png","language":"Go","readme":"# SQLite Koans\n\nCompanion code for [SQLite Koans](https://mblum.me/2023/01/sqlite-koans/)\n\nThis project configures `sqlite3` for real world apps:\n\n✅ Foreign Keys\n\n✅ Read as you Write\n\n✅ Write-Ahead Logging\n\n✅ `UTF-8` encoding\n\n✅ graceful table lock error handling via `PRAGMA busy_timeout;`\n\n✅ No empty or `null` primary keys\n\n✅ WAL backup via checkpointing\n\nThe repo has a commit covering each koan that we tie to a particular `PRAGMA` config flag:\n\n[SQLite PRAGMA](https://www.sqlite.org/pragma.html)\n\n## Depends On\n\n[SQLite Version 3.40.1](https://www.sqlite.org/releaselog/3_40_1.html)\n\n\u003e Ubuntu apt version is outdated on both Ubuntu 20 and 22\n\n## Build SQLite from source\n\n1\\. Install Build Tools\n\n\u003e `gcc` is required for `CGO` bindings used by `mattn/go-sqlite3`\n\n`sudo apt-get install build-essential gcc`\n\n1a\\. confirm `gcc` installation\n\n`gcc --version`\n\n2\\. Install latest SQLite snapshot (~v3.40.1 minimum)\n\n```\nexport SQLITE_SNAPSHOT=202301131932\nwget \"https://www.sqlite.org/snapshot/sqlite-snapshot-${SQLITE_SNAPSHOT}.tar.gz\"\ntar -xzvf sqlite-snapshot-$SQLITE_SNAPSHOT.tar.gz\ncd sqlite-snapshot-$SQLITE_SNAPSHOT\n./configure\nmake\nsudo make install\n```\n\n3\\. Verify `sqlite3` install\n\n```\n❯ sqlite3\nSQLite version 3.40.2 2023-01-13 19:32:19\nEnter \".help\" for usage hints.\nConnected to a transient in-memory database.\nUse \".open FILENAME\" to reopen on a persistent database.\nsqlite\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeblum%2Fsqlite-koans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeblum%2Fsqlite-koans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeblum%2Fsqlite-koans/lists"}