https://github.com/joaoh82/rust_sqlite Skip to content Sign up Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up Sign up {{ message }} joaoh82 / rust_sqlite * Notifications * Star 488 * Fork 24 SQLite clone from scratch in Rust MIT License 488 stars 24 forks Star Notifications * Code * Issues 2 * Pull requests 0 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights main Switch branches/tags [ ] Branches Tags Nothing to show {{ refName }} default View all branches Nothing to show {{ refName }} default View all tags 1 branch 0 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/j] Use Git or checkout with SVN using the web URL. [gh repo clone joaoh8] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @seguri seguri Fix markdown (#7) ... 9c81bec Apr 9, 2021 Fix markdown (#7) 9c81bec Git stats * 67 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows added cargo tarpaulin to github actions Feb 17, 2021 images Added some comments; Added some arch diagrams and fixed PRIMARY KEY bug Apr 4, 2021 samples Implemented Insert Parsing and Logic; Modified Create and Insert Pars... Apr 2, 2021 src added more tests and updated README Apr 6, 2021 .gitignore Implemented a simple REPL with rustyline Feb 14, 2021 CODE_OF_CONDUCT.md Added CODE_OF_CONDUCT and updated README Feb 20, 2021 Cargo.lock Implemented Database and DataTypes Mar 22, 2021 Cargo.toml Implemented Insert Parsing and Logic; Modified Create and Insert Pars... Apr 2, 2021 LICENSE Initial commit Jan 15, 2021 MAINTAINERS added maintainers, readme Jan 17, 2021 Makefile Implemented Insert Parsing and Logic; Modified Create and Insert Pars... Apr 2, 2021 README.md Fix markdown (#7) Apr 9, 2021 View code Rust-SQLite (SQLRite) Read the series of posts about it: What would SQLite look like if written in Rust? Requirements Usage (TBD) Project Progress Roadmap Contributing Code of Conduct Contact Inspiration README.md Rust-SQLite (SQLRite) Build Status dependency status Coverage Status Maintenance MIT licensed Rust-SQLite, aka SQLRite , is a simple embedded database modeled off SQLite, but developed with Rust. The goal is get a better understanding of database internals by building one. What I cannot create, I do not understand. -- Richard Feynman Read the series of posts about it: What would SQLite look like if written in Rust? * Part 0 - Overview * Part 1 - Understanding SQLite and Setting up CLI Application and REPL * Part 2 - SQL Statement and Meta Commands Parser + Error Handling * Part 3 - Understanding the B-Tree and its role on database design The SQLite Architecture Requirements Before you begin, ensure you have met the following requirements: * Rust (latest stable) - How to install Rust Usage (TBD) > ./rust_sqlite -- help SQLRite 0.1.0 Joao Henrique Machado Silva Light version of SQLite developed with Rust USAGE: rust_sqlite FLAGS: -h, --help Prints help information -V, --version Prints version information Project Progress Not checked means I am currently working on. * [*] CLI and REPL Interface * [*] Parse meta commands and sql commands. * [*] Execute simple commands * [*] Standarized error handling * [*] Generic validation structure for SQL Commands. * [*] Create Table Command Parsing * [*] Improve error handling with https://github.com/dtolnay/ thiserror * [*] Added support for parsing duplicate columns on CREATE TABLE * [*] Added support for parsing multiple PRIMARY KEY on CREATE TABLE * [*] In memory BTreeMap indexes initially only for PRIMARY KEYS. * [*] Simple INSERT queries command parsing. * [*] Implementation UNIQUE key constraints. * [ ] Improve Error Handling and return without Panic! * [ ] Simple SELECT queries (Single WHERE clause and no JOINS). * [ ] Serialization | Deserialization to and from binary encodings (bincode). Roadmap Features that are in the roadmap of the project: Ideally in order of priority, but nothing set in stone. * [ ] Implement Open command to load database with a command .open * [ ] Joins + [ ] INNER JOIN (or sometimes called simple join) + [ ] LEFT OUTER JOIN (or sometimes called LEFT JOIN) + [ ] CROSS JOIN + The RIGHT OUTER JOIN and FULL OUTER JOIN are not supported in SQLite. * [ ] WAL - Write Ahead Log Implementation * [ ] Pager Module + [ ] Implementing transactional ACID properties + [ ] Concurrency + [ ] Lock Manager * [ ] Composite Indexing - cost and performance gain analysis * [ ] Benchmarking vs SQLite for comparison * [ ] Server Client / Connection Manager * [ ] Different implementations of storage engines and data structures to optimize for different scenarios + [ ] Write Heavy - LSM Tree && SSTable + [ ] Read Heavy - B-Tree Contributing Pull requests are warmly welcome!!! For major changes, please open an issue first and let's talk about it. We are all ears! If you'd like to contribute, please fork the repository and make changes as you'd like and shoot a Pull Request our way! Please make sure to update tests as appropriate. If you feel like you need it go check the GitHub documentation on creating a pull request. Code of Conduct Contribution to the project is organized under the terms of the Contributor Covenant, the maintainer of SQLRite, @joaoh82, promises to intervene to uphold that code of conduct. Contact If you want to contact me you can reach me at joaoh82@gmail.com. Inspiration * https://cstack.github.io/db_tutorial/ About SQLite clone from scratch in Rust Resources Readme License MIT License Releases No releases published Packages 0 No packages published Contributors 5 * @joaoh82 * @seguri * @kangxiaoning * @tim-kt * @joaoh821C Languages * Rust 97.9% * Makefile 2.1% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.