{"id":13629152,"url":"https://github.com/madushadhanushka/simple-sqlite","last_synced_at":"2026-01-29T02:34:31.416Z","repository":{"id":33824761,"uuid":"158057225","full_name":"madushadhanushka/simple-sqlite","owner":"madushadhanushka","description":"Code reading for sqlite backend","archived":false,"fork":false,"pushed_at":"2023-03-01T13:41:26.000Z","size":43,"stargazers_count":392,"open_issues_count":0,"forks_count":65,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-08T19:43:19.426Z","etag":null,"topics":["database","sqlite"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madushadhanushka.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}},"created_at":"2018-11-18T06:41:06.000Z","updated_at":"2024-10-01T12:07:56.000Z","dependencies_parsed_at":"2024-01-14T06:24:20.548Z","dependency_job_id":"e6a38174-5d93-4375-bc26-02e5e9b8e3d3","html_url":"https://github.com/madushadhanushka/simple-sqlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madushadhanushka%2Fsimple-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madushadhanushka%2Fsimple-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madushadhanushka%2Fsimple-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madushadhanushka%2Fsimple-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madushadhanushka","download_url":"https://codeload.github.com/madushadhanushka/simple-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249316056,"owners_count":21249885,"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","sqlite"],"created_at":"2024-08-01T22:01:03.421Z","updated_at":"2026-01-29T02:34:31.375Z","avatar_url":"https://github.com/madushadhanushka.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"[![CMake](https://github.com/madushadhanushka/simple-sqlite/actions/workflows/cmake.yml/badge.svg)](https://github.com/madushadhanushka/simple-sqlite/actions/workflows/cmake.yml)\n\nSimple SQLite Backend\n=========\nThis repository is to understand the basic backend implementation of SQLite database. Codes are extracted from SQLite 2.5.0 version and initial implementation may have changed. Here, testing codes are added into the test directory and all SQLite implementation are included into the core directory. Tests included to test VFS, Pager and Btree functionality.\n\n## Reading materials\n[Introduction to the indexing and Btree](https://github.com/madushadhanushka/simple-sqlite/blob/master/blog/introduction_to_btree_and_bplustree.md)\n\n[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/bOFlJ0oUjU4/0.jpg)](https://www.youtube.com/watch?v=bOFlJ0oUjU4)\n\nCompile and running instructions for Unix\n======\n\n1. Take a clone of this project into your local folder \n\u003cbr/\u003e`git clone https://github.com/madushadhanushka/simple-sqlite.git`\n2. Move inside the repository\n\u003cbr/\u003e`cd simple-sqlite`\n3. Build the project with cmake\n\u003cbr/\u003e`cmake -DCMAKE_BUILD_TYPE=Debug`\n4. Build with make\n\u003cbr/\u003e`make`\n5. Run test \n\u003cbr/\u003e`./simple_sqlite`\n\nUse as your own Paging library\n========\nYou can use paging functionality to create your own file accessing implementation. You can find out sample usecase in [pager.c](https://github.com/madushadhanushka/simple-sqlite/blob/master/test/pagetest.c).\n\nOpen pager with the given file name\u003cbr/\u003e\n`int sqlitepager_open(Pager **ppPager,const char *zFilename,int nPage,int nEx);`\n\nGet page specified by the page number\u003cbr/\u003e\n`int sqlitepager_get(Pager *pPager, Pgno pgno, void **ppPage);`\n\n\nStart to write data into a page specified in pData\u003cbr/\u003e\n`int sqlitepager_write(void *pData);`\n\nCommit page changes into the file\u003cbr/\u003e\n`int sqlitepager_commit(Pager*);`\n\nClose the connection to the file\u003cbr/\u003e\n`int sqlitepager_close(Pager *pPager);`\n\n\nContribute!\n===========\nIf you see somthing wrong, Inclomplete content or improvement, you are welcome to create issue or send pull request to this repository in order to improve the code quality and the readability.\n\nFollowing are the top contributors of this repository. Keep coding! 👨🏻‍💻👩🏻‍💻\n\n\u003ca href = \"https://github.com/madushadhanushka/simple-sqlite/graphs/contributors\"\u003e\n  \u003cimg src = \"https://contrib.rocks/image?repo=madushadhanushka/simple-sqlite\"/\u003e\n\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadushadhanushka%2Fsimple-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadushadhanushka%2Fsimple-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadushadhanushka%2Fsimple-sqlite/lists"}