GlueSQL is a SQL database library written in Rust

Overview

GlueSQL

crates.io docs.rs LICENSE Rust Chat codecov.io

SQL Database Engine as a Library

GlueSQL is a SQL database library written in Rust. It provides a parser (sqlparser-rs), execution layer, and optional storage (sled) packaged into a single library. Developers can choose to use GlueSQL to build their own SQL database, or as an embedded SQL database using the default storage engine.

Standalone Mode

You can use GlueSQL as an embedded SQL database. GlueSQL provides sled as a default storage engine.

Installation

In your Cargo.toml:

[dependencies]
gluesql = "0.8"

Usage

100;", ]; for sql in sqls { let output = glue.execute(sql).unwrap(); println!("{:?}", output) } } ">
use gluesql::*;
fn main() {
    let storage = SledStorage::new("data/doc-db").unwrap();
    let mut glue = Glue::new(storage);
    let sqls = vec![
        "DROP TABLE IF EXISTS Glue;",
        "CREATE TABLE Glue (id INTEGER);",
        "INSERT INTO Glue VALUES (100);",
        "INSERT INTO Glue VALUES (200);",
        "SELECT * FROM Glue WHERE id > 100;",
    ];

    for sql in sqls {
        let output = glue.execute(sql).unwrap();
        println!("{:?}", output)
    }
}

SQL Library Mode (For Custom Storage)

Installation

sled-storage is optional, so it is not required for custom storage makers.

[dependencies.gluesql]
version = "0.8"
default-features = false
features = ["sorter", "alter-table", "index", "transaction"]

Three features below are also optional.

  • sorter - ORDER BY support for non-indexed expressions.
  • alter-table - ALTER TABLE query support
  • index - CREATE INDEX & DROP INDEX, index support
  • transaction - BEGIN, ROLLBACK and COMMIT, transaction support

Usage

There are two required 2 traits for using GlueSQL: Store and StoreMut. In src/store/mod.rs,

pub trait Store
    {
    
   async 
   fn 
   fetch_schema(..) -> ..;
    
   async 
   fn 
   scan_data(..) -> ..;
}


   pub 
   trait 
   StoreMut
    
    where 
    Self: Sized {
    
    async 
    fn 
    insert_schema(..) -> ..;
    
    async 
    fn 
    delete_schema(..) -> ..;
    
    async 
    fn 
    insert_data(..) -> ..;
    
    async 
    fn 
    update_data(..) -> ..;
    
    async 
    fn 
    delete_data(..) -> ..;
}
   
  

There is also optional store traits In src/store/alter_table.rs & src/store/index.rs

pub trait AlterTable where Self: Sized {
    async fn rename_schema(..) -> ..;
    async fn rename_column(..) -> ..;
    async fn add_column(..) -> ..;
    async fn drop_column(..) -> ..;
}

pub trait Index
    {
    
   async 
   fn 
   scan_indexed_data(..) -> ..;
}


   pub 
   trait 
   IndexMut
    
    where 
    Self: Sized {
    
    async 
    fn 
    create_index(..) -> ..;
    
    async 
    fn 
    drop_index(..) -> ..;
}


    pub 
    trait 
    Transaction 
    where 
    Self: Sized {
    
    async 
    fn 
    begin(..) -> ..;
    
    async 
    fn 
    rollback(..) -> ..;
    
    async 
    fn 
    commit(..) -> ..;
}
   
  

Use Cases

GlueSQL-js

https://github.com/gluesql/gluesql-js
Use SQL in web browsers! GlueSQL-js provides 3 storage options,

  • in-memory
  • localStorage
  • sessionStorage

GlueSQL Sheets

https://sheets.gluesql.com
Turn Google Sheets into a SQL database!
It uses Google Sheets as a storage.
Data is stored and updated from Google Sheets.

Other expected use cases

  • Add SQL layer to NoSQL databases: Redis, CouchDB...
  • Build new SQL database management system

SQL Features

GlueSQL currently supports a limited subset of queries. It's being actively developed.

  • CREATE TABLE with 8 types: INTEGER, FLOAT, BOOLEAN, TEXT, DATE, TIMESTAMP, TIME and INTERVAL.
  • ALTER TABLE with 4 operations: ADD COLUMN, DROP COLUMN, RENAME COLUMN and RENAME TO.
  • CREATE INDEX, DROP INDEX
  • INSERT, UPDATE, DELETE, SELECT, DROP TABLE
  • GROUP BY, HAVING
  • ORDER BY
  • Transaction queries: BEGIN, ROLLBACK and COMMIT
  • Nested select, join, aggregations ...

You can see tests for the currently supported queries in src/tests/*.

Contribution

There are a few simple rules to follow.

  • No mut keywords in src/executor and src/data.
  • Iterator should not be evaluated in the middle of execution layer.
  • Every error must have corresponding integration test cases to generate.
    (except for Unreachable- and Conflict- error types)
Issues
  • Refactoring crate::data::Value and removing Value::Empty

    Refactoring crate::data::Value and removing Value::Empty

    Thanks to @KyGost πŸ‘

    Prior threads,

    • https://github.com/gluesql/gluesql/pull/163
    • https://discord.com/channels/780298017940176946/780298017940176949/818732114782060555

    Goals,

    1. Removing Value::Empty and replace it to use Opt- prefixed values. Value::Empty was for representing NULL values which is filter out by outer join condition failures. However, it looks not worth enough to distinguish between normal NULLs and join failure NULLs. After we replace Value::Empty to Value::Opt- based one, then we can also remove image select_with_empty! test helper macro. What it means is that each column per row can really have a same type.

    2. Refactoring Value Current implementation of Value handles nullable types and non-nullable types in a same depth. This causes internal Value methods to quite hard to read and write codes. Current:

    pub enum Value {           
        Bool(bool),            
        I64(i64),              
        F64(f64),              
        Str(String),           
        OptBool(Option<bool>), 
        OptI64(Option<i64>),   
        OptF64(Option<f64>),   
        OptStr(Option<String>),
        Empty,  // will be removed first                
    }                          
    

    Planning to do: (enum names might be changed)

    
    enum Value {
        NotNullable(InnerValue),
        Nullable(Option<InnerValue>),
    }
    
    enum InnerValue {
        Bool(bool),
        I64(i64),
        F64(f64),
        Str(String),
    }
    
    enhancement 
    opened by panarch 23
  • Add Documentation

    Add Documentation

    WIP

    documentation enhancement 
    opened by KyGost 18
  • Auto Increment Columns

    Auto Increment Columns

    Resolve #159 Remake of #171

    enhancement 
    opened by KyGost 18
  • Function: UUID() and RAND()

    Function: UUID() and RAND()

    Resolve: #196

    enhancement 
    opened by KyGost 16
  • Split up tests

    Split up tests

    This PR makes it easier to have foldered tests by adding the build_suite!() macro.

    opened by KyGost 14
  • CREATE TABLE IF NOT EXISTS support

    CREATE TABLE IF NOT EXISTS support

    IF NOT EXISTS syntax is not supported yet. Let's make it work.

    enhancement good first issue 
    opened by panarch 12
  • Getting SELECT projection aliases

    Getting SELECT projection aliases

    Related to #80 - due to long threads, it's hard to recognize what exact task is, so let's use this issue.

    input:

    SELECT a, b AS foo, SUM(id) AS bar FROM TableA;
    

    output:

    vec!["a", "foo", "bar"]
    

    This issue is adding a new function get_projection_aliases to src/parse.rs which takes sqlparser::ast::Query reference and return column aliases, Vec<String>

    fn get_projection_aliases(query: &sqlparser::ast::Query) -> Vec<String>
    
    enhancement 
    opened by panarch 11
  • AUTO_INCREMENT

    AUTO_INCREMENT

    Resolve #159 Attempt #164 Attempt #165

    opened by KyGost 10
  •  'SingleQuotedString' is not accepted in inserts

    'SingleQuotedString' is not accepted in inserts

    Problem with insert of text.

    Insert into tableA values ("WORKS BUT NOT STANDARD" , 'STANDARD BUT IS NOT ACCEPTED');

    Most exports from other databases uses SingleQuotedString. More Standard SQL.

    Seems like expressions with SingleQuotedString works

    bug enhancement good first issue 
    opened by willy610 10
  • filter: support is null and not null expr

    filter: support is null and not null expr

    implement #50

    opened by leoppro 10
  • Simplify `evaluate_function` codes by adding macros

    Simplify `evaluate_function` codes by adding macros

    This issue is to simplify Nullable enum control flow using declarative macro.

    https://github.com/gluesql/gluesql/blob/de7310602376533f2dee87a863841f225f729179/src/executor/evaluate/mod.rs#L175-L191

    When Nullable::Null comes, it always returns Ok(Evaluated::from(Value::Null)). However, that result is also kind of success Ok. It cannot be handled by try operator ?. It would be good to use macro until rfcs/3058-try-trait-v2.html comes to Rust stable.

    e.g. https://github.com/gluesql/gluesql/blob/de7310602376533f2dee87a863841f225f729179/src/executor/evaluate/mod.rs#L225-L229

    We can change the above like this,

    Function::Lower(expr) => {
        let v = eval_to_str!(expr).to_lowercase();
    
        Ok(Evaluated::from(Value::Str(v)))
    }
    

    It is expected for us not to handle Nullable enum explicitly.

    opened by panarch 1
  • Add iterator lifetime to `RowIter`

    Add iterator lifetime to `RowIter`

    Current

    pub type RowIter<T> = Box<dyn Iterator<Item = Result<(T, Row)>>>;
    

    Planning to change

    pub type RowIter<'a, T> = Box<dyn Iterator<Item = Result<(T, Row)>> + 'a>;
    

    ref. https://github.com/gluesql/gluesql/pull/331 Then, we don't need to evaluate rows fetched in MemoryStorage scan_data implementation.

    enhancement 
    opened by panarch 1
  • Separate `sled-storage`

    Separate `sled-storage`

    null

    enhancement 
    opened by djKooks 1
  • Implement substr function

    Implement substr function

    Resolve https://github.com/gluesql/gluesql/issues/293

    substr ( string text, start integer [, count integer ] ) β†’ text

    Extracts the substring of string starting at the start'th character, and extending for count characters if that is specified. (Same as substring(string from start for count).

    enhancement 
    opened by vbbono 1
  • Support `PRIMARY KEY`

    Support `PRIMARY KEY`

    Currently, GlueSQL lacks of some column_constraints like PRIMARY KEY. It would be nice if we support that.

    CREATE TABLE SingleItem (id INTEGER PRIMARY KEY)
    
    enhancement 
    opened by heka1024 0
  • Add UUID data type

    Add UUID data type

    https://www.postgresql.org/docs/current/datatype-uuid.html

    UUID data type is Universally Unique Identifiers (UUID)

    enhancement 
    opened by maruoovv 1
  • Apply `bigdecimal` feature to `sqlparser-rs`

    Apply `bigdecimal` feature to `sqlparser-rs`

    sqlparser-rs provides bigdecimal as an optional feature. Currently, bigdecimal is not being used in here. So Literal::Number contains String, but it would be better to use bigdecimal. Then, we don't need to parse String to i64 or f64 in execution layer.

    In https://github.com/gluesql/gluesql/blob/main/src/data/literal.rs We can clean up all binary operations between number values.

    opened by panarch 1
  • Change table_name type from `&str` to `ast::ObjectName`

    Change table_name type from `&str` to `ast::ObjectName`

    Current parser supports dot(.) separated table name but GlueSQL does not support it.

    https://github.com/gluesql/gluesql/blob/76a848514e8fff909bce524736b25d5cc74252b1/src/data/table.rs#L52-L56

    There is no special reason not to use ObjectName. This issue is for replacing all &str typed table_name to use ObjectName. Store trait method param changes are also required.

    opened by panarch 0
  • Support conditional function `CASE`

    Support conditional function `CASE`

    Resolves issue #140

    I added some codes to support conditional functional CASE. The CASE expression evaluates a list of conditions and returns an expression based on the result of the evaluation. It is similar to the IF-THEN-ELSE statement in other programming languages.

    Basic structure of the CASE function

    /* expressions in [ ] are empty-able */
    CASE [ {case_expression} ]
      WHEN {condition_1} THEN {result_1}
      WHEN {condition_2} THEN {result_2}
      ...
      WHEN {condition_n} THEN {result_n}
      [ ELSE {else_result} ]
    END;
    
    • If {case_expression} is empty, CASE performs searched_case, otherwise simple_case.
    • If ELSE {else_result} is empty, it will return Null when it meets the condition.

    Use cases

    1. Simple Case: Using case with case_expression. It will match with condition and return result.
    SELECT CASE id         /* CASE case_expression */
      WHEN 1 THEN "Tony"   /* WHEN condition THEN result */
      WHEN 2 THEN "Steve"
      WHEN 3 THEN "Natasha"
      ELSE "Bruce"        /* if nothing matches, default */
    END;
    
    1. Searched Case: Using case without case_expression. It will return result only for true condition.
    SELECT CASE                  /* CASE case_expression */
      WHEN id = 1 THEN "Tony"    /* WHEN condition THEN result */
      WHEN id = 2 THEN "Steve"
      WHEN id = 3 THEN "Natasha"
      ELSE "Bruce"               /* if nothing matches, default */
    END;
    

    References

    • Sqlite CASE: https://www.sqlitetutorial.net/sqlite-case/
    • PostgreSQL CASE: https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-CASE
    enhancement 
    opened by MRGRAVITY817 7
  • Replace macros to normal closure or function in `translate/function.rs`

    Replace macros to normal closure or function in `translate/function.rs`

    There are three macros aggr, func_with_one_arg and func_with_two_arg which can be replaced by normal Rust functions or closures.

    https://github.com/gluesql/gluesql/blob/b9d9d69bd44393d0501f0ec84ba9f270d11e4266/src/translate/function.rs#L54-L87

    opened by panarch 1
Releases(v0.8.0)
  • v0.8.0(Aug 23, 2021)

    🌊 Breaking Changes

    πŸŽ‰ Transaction Support

    GlueSQL now supports "TRANSACTION"! New Transaction store trait with three interface methods: begin, rollback and commit is added. GlueSQL's default storage engine, SledStorage supports MVCC transaction using snapshot based internal data structure.

    SledStorage transaction details

    • Transaction isolation level is SNAPSHOT ISOLATION or also known as REPEATABLE READ.
    • Concurrency support but only a single writer at the same time.
    • Read operations are not blocked by other read or write operations. (snapshot based)
    • Provides transaction timeout limit functionality.

    Merged PRs

    • Implement MVCC transaction, @panarch (#257)
    • Implement SledStorage transaction timeout support, @panarch (#297)

    ✨ New Functions

    Text Functions

    • TRIM, LPAD and RPAD

    Math Functions

    • FLOOR, CEIL, ROUND, DIV, MOD, GCD, LCM, SIN, COS, TAN, EXP, LN, LOG2 and LOG10.

    Merged PRs

    • Implement TRIM function @ever0de (#292)
    • Add Floor, Ceil, Round Function @tmdgusya (#291)
    • Add mathematical functions: DIV(), MOD(). @MRGRAVITY817 (#295)
    • Add support for gcd and lcm operator @genieCS (#290)
    • Support SIN, COS, TAN functions. @maruoovv (#289)
    • Lpad rpad @No-YE (#311)
    • Add Exp, Ln, Log2, Log10 @heka1024 (#305)

    πŸš€ Features

    • Add support for like operaror @euiko (#252)

    πŸ“š Changes

    • Resolve clippy error @ever0de (#261)
    • Support DivisorShouldNotBeZero error and Remove {number} / {interval} implementations @MRGRAVITY817 (#309)
    • Remove PRIMARY KEY uses in test codes @panarch (#315)
    • Extend sled_transaction_timeout_ tests timeout duration, @panarch (#316)
    • Replace binary op macro to normal function, @panarch (#304)
    • Add toolchain file that has version number 1.54 @MRGRAVITY817 (#303)
    • Reduce try_self! and try_into! macro uses, @panarch (#302)
    • Remove Row from Payload::Select, @panarch (#287)
    • Remove unnecessary IntoIterator call syntax @ever0de (#274)
    • Replace filter_map and next to find_map @ever0de (#271)
    • Chang unreachable code that was being treated as "unwrap" to return unreachable error @ever0de (#270)
    • Update deps: sqlparser, rust_decimal, indexmap and tokio @panarch (#263)
    • Add --all-targets option to clippy @panarch (#262)
    • Remove Boolinator crate dependency, @panarch (#254)

    πŸ› Bug Fixes

    • renew Usage at README.md and Doc: executing multiple queries @devgony (#260)

    πŸ‘ New Contributors

    Welcome and thanks a lot to new contributors!

    • @euiko
    • @ever0de
    • @devgony
    • @tmdgusya
    • @MRGRAVITY817
    • @genieCS
    • @maruoovv
    • @No-YE
    • @heka1024
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Jun 28, 2021)

    🌊 Breaking Changes

    INDEX support

    Now GlueSQL support index! You can manipulate indexes using CREATE INDEX and DROP INDEX queries. Newly added query planner is not that smart enough for now, and it only supports single-expression index.

    - This kind of multi-expr index is not supported, yet.
    CREATE INDEX idx_test ON TableA (id ASC), (name DESC);
    

    For more details, you can look around index integration tests in here - INDEX - integration tests

    ORDER BY support

    Sorting by multiple expressions and both ascending & descending orders are all supported. With the feature index, ORDER BY clause can be also indexed. ORDER BY support for non-indexed expressions are supported by optional feature sorter and it is enabled by default. If you consider to use GlueSQL for big data analysis purpose, then it would be better to turn off sorter feature which requires evaluation of all fetched rows for non-indexed ORDER BY clauses.

    SELECT * FROM TableA ORDER BY id;
    SELECT * FROM TableA ORDER BY id ASC, name DESC;
    SELECT * FROM TableA ORDER BY id || name DESC, name;
    ...
    

    πŸš€ Features

    • Update query planner to find index in subqueries, @panarch (#250)
    • Fix sled-storage to read & write less on index sync, @panarch (#247)
    • Implement ORDER BY {expr} index support @panarch (#244)
    • ORDER BY support @panarch (#243)
    • Implement TryFrom<&str> for Interval, @panarch (#239)
    • Add more expr support to DEFAULT & INSERT VALUES, @panarch (#236)
    • Add index expression validator @panarch (#231)
    • Implement basic single expression index, @panarch (#227)
    • New AST for execution layer @panarch (#223)

    πŸ“š Changes

    • Fix Rust GitHub Action to check more feature combinations on clippy &… @panarch (#248)
    • Update query planner to find index in multi-expr-based ORDER BY, @panarch (#245)
    • Move Box from ast::Function to ast::Expr, @panarch (#241)
    • Split ast::Function into Function & Aggregate, @panarch (#240)
    • Remove unnecessary error formatting on expr & value types which impl … @panarch (#238)
    • Validate default expr @panarch (#237)
    • Update executor/limit to use evaluate, @panarch (#235)
    • Update dependency versions @panarch (#234)
    • Remove evaluate use_empty param, replace to handle in BlendContext @panarch (#233)
    • Fix benches/sled_benchmark.rs @panarch (#225)
    • Fix glue.rs test code to DROP TABLE at first, @panarch (#224)

    πŸ› Bug Fixes

    • Pass FilterContext to blend, projection in nested select can use oute… @panarch (#249)
    • Fix sled-storage to read & write less on index sync, @panarch (#247)
    • Apply limit after aggregate & sort finished, @panarch (#246)
    • Fix ALTER TABLE DROP COLUMN to remove related indexes @panarch (#232)
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(May 10, 2021)

    🌊 Breaking Changes

    New data types! - DATE, TIMESTAMP, TIME and INTERVAL

    • Add TIME data type support @panarch (#221)
    • Implement INTERVAL data type @panarch (#218)
    • Add DATE & TIMESTAMP data type @panarch (#215)

    πŸ“š Changes

    • Accept more timestamp input forms and add unit tests, @panarch (#222)
    • Remove unnecessary unwrap used in Interval codes @panarch (#220)
    • Replace value::TryFromLiteral trait to default trait impl, @panarch (#219)
    • Fix limit not to scan every row, @panarch (#217)
    • Add PartialEq between Value::I64 and Value::F64 @panarch (#216)
    • Remove Glue struct insert_vec function @panarch (#214)
    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Apr 28, 2021)

    πŸš€ Features

    • Merge filter->check_expr function into evaluate @panarch (#208)
    • Support binary arithmetic operations between Value::I64 and Value::F64 @panarch (#207)
    • Implement text concat operator(||) support, @panarch (#206)

    πŸ“š Changes

    • Remove implicit CAST from Evaluated to bool, @panarch (#209)
    • Update iter-enum to 1 @taiki-e (#205)
    • Small cleanups - reduce unwrap(), etc @panarch (#204)
    • API: Insert Vec @KyGost (#193)
    • Fix codes to be clippy(v0.1.51) clean @panarch (#192)
    • Select as string & parse single API @KyGost (#187)
    • Remove cargo bench from GitHub Action @panarch (#188)

    πŸ› Bug Fixes

    • Fix CREATE TABLE IF NOT EXISTS not to call insert_schema when existin… @panarch (#185)
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Mar 23, 2021)

    🌊 Breaking Changes

    • Replace Value::Opt- and Empty to Value::Null! @panarch (#169)

    Value is simplified and now it only has 5 types. No more Empty and Opt- prefixed types.

    pub enum Value {
        Bool(bool), 
        I64(i64),   
        F64(f64),   
        Str(String),
        Null,       
    }          
    

    πŸš€ Features

    • Add validation to CREATE & ALTER TABLE @panarch (#184)

    Changes

    • Merge Prepared & Execute in execute.rs @KyGost (#167)
    • Remove Value::from_data_type, merge to TryFromLiteral trait for Value @panarch (#181)
    • Add custom enum Literal, it replaces ast::Value @panarch (#180)
    • Remove Value::clone_by, replace to Value::TryFrom @panarch (#172)

    Refactoring Evaluated enum

    • Apply Cow to Evaluate, remove -Ref types @panarch (#179)
    • Add EvaluatedRef to clean Evaluated binary operation codes @panarch (#177)
    • Remove Evaluated::StringRef, @panarch (#176)
    • Rename AstValue to Literal, @panarch (#170)

    πŸ› Bug Fixes

    • Fix type validation to check all possible branches from INSERT & UPDATE @panarch (#183)
    • Remove fake unreachable errors in EvaluateError @panarch (#173)
    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Mar 10, 2021)

    πŸš€ Features

    • LEFT and RIGHT functions @KyGost (#157)
    • Implement CAST function @KyGost (#144)
    • Inserting Single Quotes value support @KyGost (#145)
    • Add type checking validator @KyGost (#143)
    • Add Documentation @KyGost (#137)

    Changes

    • Add OptStr test case to LOWER & UPPER tests @panarch (#168)
    • Migrate sqlparser dep version from v0.6.1 to v0.8.0 @panarch (#160)
    • Change literal casting function to return from AstValue to Value, @panarch (#162)
    • Update Value->cast to support nullable types, @panarch (#163)
    • Add mdbook.yml GitHub Action to automate mdBook deployment @panarch (#158)
    • Clean up evaluated.rs with macros @KyGost (#156)
    • Split data/value.rs single file module into multiple files @panarch (#154)
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Feb 21, 2021)

    πŸš€ Features

    • Implement UNIQUE constraint in CREATE TABLE @silathdiir (#141)
    • Allow Binary Operations Between <i64> and <f64> @yejihan-dev (#116)

    πŸ” Changes

    • SledStorage atomic operation support @panarch (#136)

    πŸ“– Documentation

    • Native English changes to README.md for easier readability @noproto (#138, #139)
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Dec 14, 2020)

    πŸš€ Features

    • Update StoreMut mutating data functions to accept multiple items @panarch (#133)

    Changes

    • Replace Rc<Vec<_>> to Rc<[_]>, make codes clippy clean @panarch (#132)
    • Merge multi INSERT statements in tests into a single INSERT @panarch (#134)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Dec 5, 2020)

    πŸš€ Features

    • Added benchmarks @Redblueflame (#123)
    • SledStorage Clone functionality @KyGost (#122)
    • INSERT INTO SELECT @KyGost (#120)
    • Update Store traits not to require std::marker::Send @panarch (#117)

    Changes

    • Clean up sled_storage implementation codes @panarch (#128)
    • Changed parse.rs to parse_sql.rs @Redblueflame (#126)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Nov 15, 2020)

    🌊 Breaking Changes

    • Convert store traits to async @panarch (#115)

    πŸš€ Features

    • Support Plus(+) and Minus(-) signs in WHERE @yejihan-dev (#111)
    • Change Store->fetch_schema interface return type to Option<_>, @panarch (#107)
    • Support UPPER & LOWER non-aggregating functions @panarch (#106)
    • Rename Payload::Select aliases to labels @panarch (#104)
    • Support if not exists for create table and if exist for drop table @leoppro (#68)
    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(Oct 24, 2020)

    πŸš€ Features

    • Projection aliases support for SELECT queries @panarch (#103)
    • More expression support in blend @panarch (#99)
    • Add aliased projection support - AS keyword, @zhangchunzhong (#98)

    Changes

    • Remove UnionContext, simplify Context uses @panarch (#100)
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Oct 15, 2020)

  • v0.2.1(Oct 12, 2020)

    πŸš€ Features

    • Implement ALTER TABLE - ADD, DROP, RENAME COLUMN & RENAME TABLE @panarch (#92)
    • Implement DEFAULT column option support in CREATE TABLE @panarch (#91)
    • Remove Unreachable error in Row, replace to controllable error. @panarch (#90)

    πŸ› Bug Fixes

    • Report an error for inserting more values than table columns @silathdiir (#89)

    Changes

    • Update Cargo.toml default to have all features @panarch (#93)
    • Change Store trait insert_data return type @panarch (#86)
    • Add doc comments to enum Evaluated @panarch (#85)
    Source code(tar.gz)
    Source code(zip)
  • untagged-438b9c572b6fe28c43fd(Sep 24, 2020)

    Changes

    • Return row count instead of rows on Insert @ryanhossain9797 (#71)
    • change the behavior about null @leoppro (#67)
    • Add cargo fmt to github actions @Atul9 (#54)

    πŸš€ Features

    • Implement HAVING support (#12) @panarch (#81)
    • Implement GROUP BY (#12) @panarch (#74)
    • Add support for Inserting Multiple rows @ryanhossain9797 (#69)
    • Add support for EXISTS and NOT EXISTS @ryanhossain9797 (#60)
    • filter: support is null and not null expr @leoppro (#59)
    • Add support for BETWEEN and NOT BETWEEN @ryanhossain9797 (#56)
    • Eval num @panarch (#48)
    Source code(tar.gz)
    Source code(zip)
Owner
GlueSQL
GlueSQL
TDS 7.2+ (mssql / Microsoft SQL Server) async driver for rust

Tiberius A native Microsoft SQL Server (TDS) client for Rust. Supported SQL Server versions Version Support level Notes 2019 Tested on CI 2017 Tested

Prisma 115 Sep 8, 2021
https://crates.io/crates/transistor

Transistor A Rust Crux Client crate/lib. For now, this crate intends to support 2 ways to interact with Crux: Via Docker with a crux-standalone versio

Julia Naomi 27 Aug 31, 2021
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

Skytable 417 Sep 18, 2021
🐸Slippi DB ingests Slippi replays and puts the data into a SQLite database for easier parsing.

The primary goal of this project is to make it easier to analyze large amounts of Slippi data. Its end goal is to create something similar to Ballchasing.com but for Melee.

Max Timkovich 15 Jun 19, 2021
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

Skybase 411 Sep 6, 2021
A programmable document database inspired by CouchDB written in Rust

PliantDB PliantDB aims to be a Rust-written, ACID-compliant, document-database inspired by CouchDB. While it is inspired by CouchDB, this project will

Khonsu Labs 55 Sep 20, 2021
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. Authors: Sanjay Ghem

Google 26.4k Sep 11, 2021
Immutable Ordered Key-Value Database Engine

PumpkinDB Build status (Linux) Build status (Windows) Project status Usable, between alpha and beta Production-readiness Depends on your risk toleranc

null 1.3k Sep 14, 2021
FeOphant - A SQL database server written in Rust and inspired by PostreSQL.

A PostgreSQL inspired SQL database written in Rust.

Christopher Hotchkiss 19 Sep 13, 2021
Materialize simplifies application development with streaming data. Incrementally-updated materialized views - in PostgreSQL and in real time. Materialize is powered by Timely Dataflow.

Materialize is a streaming database for real-time applications. Get started Check out our getting started guide. About Materialize lets you ask questi

Materialize, Inc. 3.1k Sep 17, 2021
The official MongoDB Rust Driver

MongoDB Rust Driver This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with Mon

mongodb 814 Sep 14, 2021
Yet Another Kev-Value DataBase

Yet Another Kev-Value DataBase Extremely simple (simplest possible?) single-file BTree-based key-value database. Build for fun and learning: goal is t

Sergey Melnychuk 16 Aug 30, 2021
SQLite clone from scratch in Rust

Rust-SQLite (SQLRite) Rust-SQLite, aka SQLRite , is a simple embedded database modeled off SQLite, but developed with Rust. The goal is get a better u

JoΓ£o Henrique Machado Silva 722 Sep 17, 2021
UnQLite wrapper 1.0 is avaliable for Rust

unqlite A high-level UnQLite database engine wrapper. NOTE: Some of the documents is stolen from UnQLite Official Website. What is UnQLite? UnQLite is

Huo Linhe 83 Aug 19, 2021
Query LDAP and AD with SQL

SQLDAP Ever wanted to query AD or LDAP with SQL like queries ? I'm going to answer this question myself: yes ! Why ? Because I never could remember al

null 5 Jun 30, 2021
A user crud written in Rust, designed to connect to a MySQL database with full integration test coverage.

SQLX User CRUD Purpose This application demonstrates the how to implement a common design for CRUDs in, potentially, a system of microservices. The de

null 38 Sep 10, 2021
leveldb LevelDB LevelDB skade/leveldb β€” LevelDB bindings

Rust leveldb bindings Almost-complete bindings for leveldb for Rust. Documentation Rust version policy leveldb is built and tested on stable releases

Florian Gilcher 132 Aug 30, 2021
WooriDB

WooriDB USER GUIDE WooriDB is a general purpose (EXPERIMENTAL) time serial database, which means it contains all entities registries indexed by DateTi

Julia Naomi 85 Aug 11, 2021
Experimental blockchain database

A database for the blockchain. Design considerations API The database is a universal key-value storage that supports transactions. It does not support

Parity Technologies 80 Sep 11, 2021