https://github.com/jrmurr/sqljr
Toy DB to get more sytems expereince
https://github.com/jrmurr/sqljr
database rust
Last synced: 12 months ago
JSON representation
Toy DB to get more sytems expereince
- Host: GitHub
- URL: https://github.com/jrmurr/sqljr
- Owner: JRMurr
- Created: 2022-12-22T00:24:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-08T23:18:09.000Z (about 3 years ago)
- Last Synced: 2025-06-25T02:49:01.942Z (12 months ago)
- Topics: database, rust
- Language: Rust
- Homepage:
- Size: 174 KB
- Stars: 26
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SQLJr
Toy DB to get more systems experience
## TODO
- General
- Make a schema aware row struct
- Repl
- Handle multiline queries (maybe streaming nom might work?)
- Parser
- Would be cool to make a combinator/macro that is tuple where each elem is separated by whitespace
- Would be cool to make a macro for SqlQuery that auto makes the alt with each variant
- Errors
- https://fasterthanli.me/series/advent-of-code-2022/part-11#nice-parser-errors
- https://www.reddit.com/r/rust/comments/p9t3jh/miette_a_fancy_new_diagnostics_definition_and/ha0wl0q/
- look at https://github.com/swc-project/swc/tree/main/crates/swc_error_reporters/src for error reporting
## Resources
- [Nom sql parser](https://github.com/ms705/nom-sql)
- [DB walk through](https://cstack.github.io/db_tutorial/)
- [Nom combinators](https://github.com/Geal/nom/blob/main/doc/choosing_a_combinator.md)
- [Searlization/page stuff](https://www.reddit.com/r/rust/comments/ukz786/rust_way_of_dealing_with_memory_allocation/)
- [Miette (errors)](https://docs.rs/miette/latest/miette/)