GlueSQL - Coming Soon
SQL Database Engine as a Library
GlueSQL is a SQL database library written in Rust, it provides parser (sql-parser), execution layer, and an optional storage (sled).
Developers can use GlueSQL to build their own SQL databases or they can simply use GlueSQL as an embedded SQL database using default storage.
Standalone Mode
You can simply use GlueSQL as an embedded SQL database, GlueSQL provides sled as a default storage engine.
Installation
In your Cargo.toml
[]
= { = "0.1.10", = ["sled-storage"] }
Usage
use *;
SQL Library Mode (For Custom Storage)
Installation
Now you don't need to include sled-storage. So in Cargo.toml,
[]
= "0.1.10"
Usage
All you only need to do is implementing 2 traits: Store and StoreMut!
In src/store.rs,
Examples - GlueSQL-js
Use SQL in web browsers!
GlueSQL-js provides 3 storage options,
- in-memory
- localStorage
- sessionStorage.
SQL Features
src/tests/*
:smile:
Plans
:smile:
- More SQL syntax supports - GROUP BY, HAVING ...
Providing more Store traits
Not only Store and StoreMut, but also GlueSQL will separately provides,
- ForeignKey trait
- Transaction trait
- Index trait
Then users can make their own SQL database with only using
Store&StoreMut, orStore+StoreMut+ForeignKeybut withoutIndexandTransactionsupport.- with all traits.
- etc...
Contribution
It's very early stage, please feel free to do whatever you want to.
Only the thing you need to be aware of is...
- Except for
src/glue.rsandsrc/tests/, there is no place to usemutkeyword.