| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a starting point for Zig solutions to the "Build Your Own SQLite" Challenge.
In this challenge, you'll build a barebones SQLite implementation that supports basic SQL queries like SELECT. Along the way we'll learn about SQLite's file format, how indexed data is stored in B-trees and more.
Note: If you're viewing this repo on GitHub, head over to codecrafters.io to try the challenge.
The entry point for your SQLite implementation is in app/main.zig. Study and uncomment the relevant code, and push your changes to pass the first stage:
git add .
git commit -m "pass 1st stage" # any msg
git push origin masterTime to move on to the next stage!
Note: This section is for stages 2 and beyond.
To make it easy to test queries locally, we've added a sample database in the root of this repository: sample.db.
This contains two tables: apples & oranges. You can use this to test your implementation for the first 6 stages.
You can explore this database by running queries against it like this:
$ sqlite3 sample.db "select id, name from apples"
1|Granny Smith
2|Fuji
3|Honeycrisp
4|Golden DeliciousThere are two other databases that you can use:
These aren't included in the repository because they're large in size. You can download them by running this script:
./download_sample_databases.shIf the script doesn't work for some reason, you can download the databases directly from codecrafters-io/sample-sqlite-databases.
| Back | FazBrowse Home | New Git URL |