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)
Comments
  • 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
  • Separate `sled-storage` to new workspace

    Separate `sled-storage` to new workspace

    Hello,

    Currently implementation of sled wrapper is being offered as default, and kept inside the project. But because gluesql is sql db engine for multiple storage system, it will be better to separate sled implementation for new workspace. It can be better to make project more common, and sled wrapper can be used as a reference for other storage wrapper in future πŸ€”

    enhancement 
    opened by kination 14
  • Function: UUID()

    Function: UUID()

    UUID() is a function which generates a random, unique ID. T-SQL Spec for NEWID() MySQL UUID MySQL UUID Short

    Functions as UUID_SHORT() from MySQL.

    Future PR?: BYTES data type and 128 byte UUID function

    Note that, compared to performance of AUTO_INCREMENT, this will be very slow.

    opened by KyGost 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
  • CLI interface

    CLI interface

    Is a command line interface planned? I liked playing around with the web interface but there doesn't seem to be something equivalent for the terminal?

    enhancement 
    opened by MichaelMcDonnell 11
  • 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 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
  • Simplify repetitive `#[derive(Debug, Clone, PartialEq, ...)]` macros by adding attribute type proc-macro `#[basic_derives]`.

    Simplify repetitive `#[derive(Debug, Clone, PartialEq, ...)]` macros by adding attribute type proc-macro `#[basic_derives]`.

    Resolves #555

    This pull request tries to solve the problem referred in #555.

    Expected changes

    // before
    use serde::{Serialize, Deserialize};
    
    #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
    pub enum SetExpr {
        Select(Box<Select>),
        Values(Values),
    }
    
    // after
    #[basic_derives]
    pub enum SetExpr {
        Select(Box<Select>),
        Values(Values),
    }
    

    Important thing is that this new #[basic_derives] macro also auto-imports Serialize, Deserialize from serde.

    Work in progress ⏰

    opened by MRGRAVITY817 9
  • Apply code coverage test to GitHub Action

    Apply code coverage test to GitHub Action

    This resolves issue #325 .

    I added a Github Action workflow to check code coverage test.

    Main tool used

    • tarpaulin: This crate is an awesome code coverage tool for Rust projects.
    • codecov.io: This will give your coverage tests a better visual.

    Tasks done

    • [X] When pull request is made, trigger code coverage test and share the report to PR.
    • [X] Provide a way to run this code coverage test in the fork repositories.

    For furthur details...

    • tarpaulin: https://crates.io/crates/cargo-tarpaulin
    • codecov.io
      • How to get your fork connected to codecov.io: https://docs.codecov.com/docs/quick-start
      • Pull request comments: https://docs.codecov.com/docs/pull-request-comments
    opened by MRGRAVITY817 9
  • Implement TRIM function

    Implement TRIM function

    • Implement TRIM function
    • This function is multibyte safe
    • Implementing this feature allows to perform the following actions
    1. Remove whitespaces from prefixes and suffixes
      • If only str parameter
      • rust/std/str/trim
      • In the example above, consideration of \t should also be considered
    2. If the specifier is BOTH, Remove the specifier parameter to the prefix and suffix
      • @panarch Please check the contents below
      • SELECT TRIM(BOTH 'xyz' FROM 'xyzybarxzxxz');
      • The result values for this query are different and which method do you want to adopt?
      1. PostgreSQL
        • bar
      2. MySQL
        • ybarxzxxz
    3. If the specifier is LEADING, Remove the specifier parameter to the prefix
      • SELECT TRIM(LEADING 'xyz' FROM 'xyzybarxzxxz');
      1. PostgreSQL
        • barxzxxz
      2. MySQL
        • ybarxzxxz
    4. If the specifier is TRAILING, Remove the specifier parameter to the suffix
      • SELECT TRIM(TRAILING 'xyz' FROM 'xyzybarxzxyz');
      1. PostgreSQL
        • xyzybar
      2. MySQL
        • xyzybarxz

    A point of caution

    • If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed
    • Which adopt, PostgreSQL or MySQL

    Example

    PostgreSQL

    trim(both 'xyz' from 'yxTomxx') β†’ Tom
    
    • This is a non-standard syntax for trim()
      • @panarch Don't have to support?
    trim(both from 'yxTomxx', 'xyz')Β β†’Β Tom
    

    MySQL

    SELECT TRIM('  bar   ')  -> bar
    SELECT TRIM(LEADING 'x' FROM 'xxxbarxxx') -> barxxx
    SELECT TRIM(BOTH 'x' FROM 'xxxbarxxx') -> bar
    SELECT TRIM(TRAILING 'xyz' FROM 'barxxyz') -> barx
    

    Reference

    image

    image

    enhancement 
    opened by ever0de 9
  • Omitting NULL column in INSERT is not accepted

    Omitting NULL column in INSERT is not accepted

    CREATE TABLE test (id INT, id_text TEXT NULL);
    
    INSERT INTO test (id) VALUES (1);
    -- Err(Row(LackOfRequiredColumn("id_text")))
    

    This insert statement should be accepted but it is not.

    bug 
    opened by panarch 8
  • fix: Missing U8 in integration test

    fix: Missing U8 in integration test

    I have found out that the tests for u8 are missing from the integration test. I will apply these changes when the following PR #844 is merged to the main branch.

    Thank you

    opened by ChobobDev 0
  • Implement str_position function under enum Value

    Implement str_position function under enum Value

    Background

    for #855

    mysql POSITION function return examples

    SELECT POSITION("h" IN "sushi") AS MatchPosition;
    

    |MatchPosition| |----------------| |4|

    SELECT POSITION("" IN "sushi") AS MatchPosition;
    

    |MatchPosition| |----------------| |1|

    SELECT POSITION(NULL IN "sushi") AS MatchPosition;
    

    |MatchPosition| |----------------| |NULL|

    SELECT POSITION(-1 IN "sushi") AS MatchPosition;
    

    |MatchPosition| |----------------| |0|

    SELECT POSITION(2022-09-25 IN "sushi") AS MatchPosition;
    

    |MatchPosition| |----------------| |0|

    Description

    Added function to support mysql's POSITION function.

    Since the substring and string to be parsed and received as an argument in the sql statement are value types in glusql, the str_position function has been implemented for the operation.

    If empty_string found in arguments, I64(0) is returned. If substring in string found, the position of the first occurrence is returned. The minimum value is I64(1). If NULL found in arguments, Null is returned. Although mysql returns 0 for other types of arguments, I decided to display an Error for types other than string and null.

    Tasks

    • [x] Write implementation
    • [x] Add unit, doc Tests
    • [x] Add Error
    enhancement 
    opened by zmrdltl 1
  • Support Dictionary(Schema) view

    Support Dictionary(Schema) view

    Goal

    Support Dictionary view to get schema information.

    gluesql> SELECT * FROM GLUE_TABLES;
    

    | TABLE_NAME | |------------| | Bar | | Foo |

    gluesql> SELECT * FROM GLUE_TABLE_COLUMNS;
    

    | TABLE_NAME | COLUMN_NAME | COLUMN_ID | |------------|-------------|-----------| | Bar | id | 1 | | Bar | name | 2 | | Bar | type | 3 | | Foo | id | 1 | | Foo | name | 2 |

    Todo

    • [x] add TableFactor::Dictionary
    • [x] implement fetch_all_schemas
    • [x] implement GLUE_TABLES, GLUE_TABLE_COLUMNS
    • [x] refactor show tables with fetch_all_schemas, show version with direct implementation
    • [x] remove feature - metadata

    References

    oracle data dictionary view mysql data dictionary schema postgresql system catalogs

    enhancement 
    opened by devgony 1
  • fix: Ambiguous column should return error even with identical table join

    fix: Ambiguous column should return error even with identical table join

    Symptom

    gluesql> create table Foo(id int);
    gluesql> select * from Foo a join Foo b on a.id = b.id;
    | id | id |
    
    gluesql> select id from Foo a join Foo b on a.id = b.id;
    | id |
    
    • Even if There are two ids, it does not return Error since It gathers table_name with Hashmap

    Fix to

    gluesql> select id from Foo a join Foo b on a.id = b.id;
    ERROR:  column reference "id" is ambiguous
    

    Plan

    A. gather aliases B. replace Hashmap with Vec<_>

    bug 
    opened by devgony 0
Releases(v0.12.0)
  • v0.12.0(Aug 22, 2022)

    🌊 Breaking Changes

    ⚑ Store trait changes

    1. Store traits no longer require generic T
    // v0.11
    pub trait Store<T: Debug> { .. }
    pub trait StoreMut<T: Debug> where Self: Sized { .. }
    pub trait Index<T: Debug> { .. }
    pub trait IndexMut<T: Debug> where Self: Sized { .. }
    
    // v0.12
    pub trait Store { .. }
    pub trait StoreMut where Self: Sized { .. }
    pub trait Index { .. }
    pub trait IndexMut where Self: Sized { .. }
    

    Related PRs

    • Remove generic T from Store, StoreMut and Index traits, @panarch (#589)
    • Replace SledStorage generic key T from IVec to data::Key @panarch (#588)
    • Replace MemoryStorage Key to core::data::Key, @panarch (#577)
    1. Store::fetch_data is newly added, Store trait now requires three methods to implement
    pub trait Store {
        async fn fetch_schema(&self, table_name: &str) -> Result<Option<Schema>>;
        async fn fetch_data(&self, table_name: &str, key: &Key) -> Result<Option<Row>>;
        async fn scan_data(&self, table_name: &str) -> Result<RowIter>;
    }
    

    Related PR

    • Implement primary key support, @panarch (#687)
    1. StoreMut trait method renamings - insert_data -> append_data and update_data -> insert_data
    pub trait StoreMut where Self: Sized {
        ...
        async fn append_data(..) -> ..;
        async fn insert_data(..) -> ..;
    }
    

    Related PR

    • Rename StoreMut insert_data & update_data methods, @panarch (#774)

    🌐 PRIMARY KEY support

    GlueSQL now supports PRIMARY KEY!

    CREATE TABLE Allegro (
        id INTEGER PRIMARY KEY,
        name TEXT,
    );
    

    more info - test-suite/primary_key

    • Implement primary key support, @panarch (#687)
    • Update Expr::CompoundIdentifier to have more accurate data format @devgony (#770)
    • Update SledStorage key.rs to use IVec::from_iter, not IVec::from @panarch (#765)
    • Update SledStorage scan_(indexed)_data key not to contain table prefix, @panarch (#762)
    • Update sled-storage::update_data not to return error on not-existing … @panarch (#717)

    βš“ New queries support

    Select query without table & support SERIES(N)

    SELECT 1;
    SELECT N FROM SERIES(10);
    

    more info - test-suite/series

    • Support SELECT * FROM Series(N) and SELECT 1(without table) @devgony (#733)

    VALUES support

    VALUES (1, 'a'), (2, 'b');
    VALUES (1, 'a'), (2, 'b') LIMIT 1;
    VALUES (1, 'a'), (2, 'b') LIMIT 1 OFFSET 1;
    SELECT * FROM (VALUES (1, 'a'), (2, 'b')) AS Derived;
    SELECT * FROM (VALUES (1, 'a'), (2, 'b')) AS Derived(id, name);
    CREATE TABLE TableFromValues AS VALUES (1, 'a', True, Null, Null), (2, 'b', False, 3, Null)
    

    more info - test-suite/values

    • Support Derived VALUES @devgony (#731)
    • Support CTAV(Create Table As Values) @devgony (#704)
    • Enhance Values List to validate column type @devgony (#659)
    • Support VALUES List in select module @devgony (#648)

    Inline view

    SELECT * FROM (SELECT COUNT(*) FROM InnerTable) AS InlineView
    

    more info - test-suite/inline_view

    • Support Inline view (FROM clause subquery) @devgony (#523)

    πŸ’’ New storage - SharedMemoryStorage

    Non-persistent storage engine which works in multi-threaded environment

    • Implement shared memory storage @ever0de (#500)

    🌟 [Alpha Phase] AST Builder

    Now, SQL is not the only language supported by GlueSQL! AST Builder generates GlueSQL AST directly from Rust codes.

    e.g.

    let actual = table("Bar")
        .select()
        .filter(col("id").is_null())
        .group_by("id, (a + name)")
        .build();
    let expected = "
        SELECT * FROM Bar
        WHERE id IS NULL
        GROUP BY id, (a + name)
    ";  
    
    let actual = table("Bar")
        .select()
        .group_by("city")
        .project("city, COUNT(name) as num")
        .build();
    let expected = "
        SELECT
          city, COUNT(name) as num
        FROM Bar
        GROUP BY city
    ";
    
    let actual = table("Person")
        .delete()
        .filter(col("name").is_null())
        .build();
    let expected = "DELETE FROM Person WHERE name IS NULL";
    

    more info - core/ AST Builder

    Related PRs

    • Add in_subquery test case using QueryNode @CEOJINSUNG (#781)
    • Add QueryNode enum and test_query function @CEOJINSUNG (#777)
    • feat:[#756] implement Ltrim and Rtrim function @ChobobDev (#763)
    • [AST Builder] Implement substr Funciton @seonghun-dev (#758)
    • [AST Builder] Implement Exp Funciton @seonghun-dev (#753)
    • [AST Builder] Implement Lpad, Rpad Funciton @seonghun-dev (#752)
    • Implement cast function in AST builder @kim-seo-hyun (#759)
    • [AST Builder] Implement Concat Funciton @seonghun-dev (#750)
    • [AST Builder] Implement radians, degrees Funciton @seonghun-dev (#755)
    • [AST Builder] Implement Repeat Funciton @seonghun-dev (#742)
    • [AST Builder] Implement GenerateUuid Funciton @seonghun-dev (#740)
    • feat:[#732] Implement Gcd and Lcm function to ast_builder @ChobobDev (#734)
    • feat:[#728] Implement Logfunction to ast_builder @ChobobDev (#729)
    • feat:[#725] Implement Power and Sqrt function to ast_builder @ChobobDev (#726)
    • [AST Builder] Update FunctionNode structure @zmrdltl (#723)
    • [AST Builder] Implement InSubquery and QueryNode @CEOJINSUNG (#721)
    • [AST Builder] Implement Sign function @kim-seo-hyun (#711)
    • [AST Builder] Implement Transaction Statements @ding-young (#709)
    • [AST Builder] Implement AST builder InList function @CEOJINSUNG (#697)
    • [AST Builder] Implement Index Expr @seonghun-dev (#673)
    • [AST Builder] Implement drop_table Expr @seonghun-dev (#695)
    • implement now function in ast builder @kim-seo-hyun (#692)
    • [AST Builder] Implement show_columns Expr @seonghun-dev (#689)
    • Implement AST-builder between expression function @CEOJINSUNG (#672)
    • feat(ast_build): implement binary operations (modulo, like, ilike, not_like, not_ilike) @bugoverdose (#686)
    • refactor(ast_build): reorder binary_op functions and tests @bugoverdose (#681)
    • Implement ln in ast_builder @gimwonbae (#680)
    • Implement unary_op (+, -, NOT, !) in ast_builder @ding-young (#669)
    • Implement AST-builder extract functions @CEOJINSUNG (#666)
    • Implement round function in ast_builder @ding-young (#657)
    • [AST Builder] Implement Agggregate function COUNT @zmrdltl (#656)
    • Add more expression support to project, @panarch (#655)
    • Implement ast_builder binary::gte&lte&or @woojinnn (#654)
    • Enhance SelectNode::filter @woojinnn (#653)
    • Implement AST-builder log2, log10 function @CEOJINSUNG (#650)
    • implement ceil function @jaeyoung0909 (#645)
    • feat(ast_builder): Add Agggregate functions @zmrdltl (#635)
    • Implement add reverse func in ast_builder @seonghun-dev (#637)
    • implement ast_builder/expr/function/{Left, Right} @woojinnn (#626)
    • Implements trigonometric functions in ast_builder @nyeong (#627)
    • feat(ast_build): implement upper function @ChobobDev (#621)
    • feat(ast_build): implement ifnull function @bugoverdose (#620)
    • Add floor func in ast_builder @yujong-lee (#616)
    • Implement query builder base (AST builder) @panarch (#613)

    πŸš€ Features

    CLI updates

    • Support .spool FilePath command in CLI @devgony (#748)
    • Support .columns TABLE command in CLI @devgony (#736)

    New data types

    • Add INT(16) data type @yujong-lee (#632)
    • Add data type i32 @bearney74 (#608)
    • Add BYTEA data type support @panarch (#586)
    • Add i128 (int128) data type @bearney74 (#563)

    New aggregate function - STDEV & VARIANCE

    • Add STDEV aggregate funtion @zmrdltl (#684)
    • Support VARIANCE aggregate function & update aggregate test @zmrdltl (#598)
    • [Data] Add function sqrt for enum Value @zmrdltl (#675)

    New function - IFNULL

    • Implement IFNull function @bearney74 (#569)

    New statement - SHOW INDEXES FROM {table}

    • Add Description column to "show index from table" output @bearney74 (#600)
    • Show indexes from table... (resolves issue #520) @bearney74 (#551)

    ToSql

    • Implement ToSql trait which displays AST as SQL text format @bearney74 (#554)

    πŸ’‘ Improvements

    GitHub Action related

    • Update rust.yml GitHub Action to handle sled_transaction_timeout_* te… @panarch (#772)
    • Remove clippy warning in mac os @24seconds (#715)
    • Run github action job parallel @24seconds (#699)
    • Update coverage action to use grcov & Coveralls @panarch (#647)
    • Simplify github rust action - Run tests & Run examples, @panarch (#594)

    Test Suite refactoring

    • [Test Suite] Merge use crates into one @zmrdltl (#788)
    • [Test Suite] Refactor basic @zmrdltl (#785)
    • [Test Suite] delete unneccesary keyword vec!, iter() @zmrdltl (#775)
    • [Test Suite] Refactor arithmetic @zmrdltl (#773)
    • [Test Suite] Refactor aggregate @zmrdltl (#771)

    rust-toolchain & sqlparser-rs migration

    • chore:[#700] rust version update @ChobobDev (#724)
    • upgrade to Sqlparser 0.18 @bearney74 (#612)
    • upgrade to rust 1.61 @bearney74 (#564)
    • Update rusttoolchain version to 1.60 and sqlparser-rs to 0.17 @bearney74 (#557)

    Other improvements

    • Add Update integration test @seonghun-dev (#738)
    • Replace bool::then to bool::then_some @panarch (#727)
    • import only where you use Duration @ever0de (#722)
    • Remove unnecessary Box @ever0de (#716)
    • Add DROP TABLE multi object test case in integration test @seonghun-dev (#706)
    • Mark flaky test using target_os cfg @24seconds (#702)
    • Update aggregate structure @zmrdltl (#698)
    • Convert TryInto traits into TryFrom @nyeong (#682)
    • Add SharedMemoryStorage to the src documentation comment @kim-seo-hyun (#664)
    • Add missing test case in test-suite workspace @ever0de (#649)
    • Update data types in README.md @arsenkhy (#644)
    • Remove unnecessary Result @ever0de (#622)
    • Support Deserialize for Payload @ever0de (#607)
    • Migrate cli/ clap-rs version to v3.2.2 @panarch (#606)
    • Ambiguous column selection should be detected while joining @MRGRAVITY817 (#583)
    • Fix primitive numeric types cast not to panic @bearney74 (#573)
    • Specify importing modules explicitly in data/value/into.rs @panarch (#587)
    • Use const Dialect in parse_query @ever0de (#584)
    • Fix PartialEq between f64 and other numeric types @bearney74 (#585)
    • Update ast::DataType enum to use SCREAMING_SNAKE_CASE @bearney74 (#575)
    • Use checked_x functions for binary op between i8, i64 and decimal data types not to panic on overflow @bearney74 (#571)
    • Replace the to_string macro with the serialize_all macro @ever0de (#565)
    • Fix the link in gluesql-js/README.md Webpack example @MRGRAVITY817 (#559)
    • Unify GroupKey, HashKey(join) and UniqueKey into a single data::Key s… @panarch (#553)
    • Clean up gluesql-js/ build scripts, @panarch (#552)

    πŸ› Bug Fixes

    • Fix CAST into i32 or i64 from numeric literals @bearney74 (#611)
    • Fix SledStorage export & import multiple times bug, @panarch (#605)
    • Fix gluesql-js build and tests @panarch (#591)
    • Fix core translate with metadata feature only @panarch (#590)
    • Fix sled_multi_threaded example code with threads of INSERT and SELECT, @ever0de (#580)
    • Fix rust clippy gh action to check optional features @panarch (#578)
    • Fix modulo binary op to handle zero divisor correctly @bearney74 (#576)
    • Fix divide by zero error in data::Value @bearney74 (#572)
    • Handle DROP INDEX invalid params @ever0de (#566)
    • Fix Glue::execute to run multiple sql query string @ming535 (#562)

    πŸ‘ New Contributors

    • @ming535 made their first contribution in https://github.com/gluesql/gluesql/pull/562
    • @yujong-lee made their first contribution in https://github.com/gluesql/gluesql/pull/616
    • @bugoverdose made their first contribution in https://github.com/gluesql/gluesql/pull/620
    • @woojinnn made their first contribution in https://github.com/gluesql/gluesql/pull/626
    • @ChobobDev made their first contribution in https://github.com/gluesql/gluesql/pull/621
    • @nyeong made their first contribution in https://github.com/gluesql/gluesql/pull/627
    • @seonghun-dev made their first contribution in https://github.com/gluesql/gluesql/pull/637
    • @arsenkhy made their first contribution in https://github.com/gluesql/gluesql/pull/644
    • @jaeyoung0909 made their first contribution in https://github.com/gluesql/gluesql/pull/645
    • @CEOJINSUNG made their first contribution in https://github.com/gluesql/gluesql/pull/650
    • @ding-young made their first contribution in https://github.com/gluesql/gluesql/pull/657
    • @kim-seo-hyun made their first contribution in https://github.com/gluesql/gluesql/pull/664
    • @gimwonbae made their first contribution in https://github.com/gluesql/gluesql/pull/680

    Full Changelog: https://github.com/gluesql/gluesql/compare/v0.11.0...v0.12

    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(May 14, 2022)

    🌊 Breaking Changes

    🌈 GlueSQL.js

    JavaScript interface for both web browsers and Node.js
    GlueSQL works again in web browsers!

    e.g.

    import { gluesql } from 'gluesql';
    
    const db = await gluesql();
    
    db.query(`
      CREATE TABLE User (id INTEGER, name TEXT);
      INSERT INTO User VALUES (1, "Hello"), (2, "World");
    `);
    
    const [{ rows }] = await db.query('SELECT * FROM User;');
    console.log(rows);
    

    More Info

    • https://github.com/gluesql/gluesql/tree/main/gluesql-js

    Related PRs

    • Implement TryFrom between Value and serde_json::Value @panarch (#501)
    • GlueSQL.js - support both web browsers and Node.js @panarch (#512)
    • Fix gluesql-js/package.json to publish files correctly, @panarch (#543)

    πŸš€ Features

    New functions - ABS, SIGN and CONCAT

    • Concat function implementation @earney (#521)
    • add ABS and SIGN functions @earney (#510)

    SHOW COLUMNS

    • Implement SHOW COLUMNS @earney (#517)

    SledStorage export and import

    • Implement SledStorage export & import features @panarch (#547)

    CLI - SQL file read-and-execute

    • Add support SQL file read-and-execute @pythonbrad (#496)

    Other new features

    • Implement cast to decimal @earney (#529)
    • More numeric binary operations with Decimal @earney (#530)
    • Implement hash join executor support @panarch (#494)
    • Feature implementation - Unary Factorial operation for (unsigned) INT8 type @MRGRAVITY817 (#477)
    • Support limit, offset clause in Insert into values ~ @devgony (#484)
    • Update evaluate_stateless to support all existing SQL functions, @panarch (#471)

    πŸ’‘ Improvements

    sqlparser-rs migration

    • Migrate code from sqlparser v14 to v16 @earney (#542)
    • Migrate sqlparser-rs version from v0.13 to v0.14, @panarch (#541)
    • Bump up sqlparser crate version from 0.11 to 0.13 @MRGRAVITY817 (#479)

    Unit test

    • Add unit tests to data/value/into.rs module @pythonbrad (#518)
    • Add unit tests for data/value/literal.rs @pythonbrad (#497)

    Error handling

    • Scalar subquery should throw Error when more than one row returned @devgony (#537)
    • Apply better names to numeric binary operation error names #424 @earney (#534)
    • cast 255 as int8, should return an error, but returns 127 instead (resolves issue #545) @earney (#546)

    Other improvements

    • Fix typo (Tripple to Triple) @ever0de (#539)
    • Minor improvements @ever0de (#507)
    • Bump up toolchain ver. from 1.58 -> 1.59 @MRGRAVITY817 (#502)
    • Apply nit code improvements to core/ executor/join module @panarch (#498)
    • Simplify lifetime uses in data/literal binary operators @panarch (#495)
    • Add macos attributes in gitignore @ever0de (#492)
    • Fix typo @ever0de (#490)
    • Remove unused generic in IndexMut @ever0de (#488)
    • Remove Debug macro from the generic requirements for key @ever0de (#486)
    • Bump rust version 1.58 @ever0de (#487)
    • Update Join::apply to take the whole table(rows) as a stream iterator @MRGRAVITY817 (#472)

    πŸ› Bug Fixes

    • Fix CLI --execute {file}.sql option to support CRLF line break, @panarch (#519)
    • Fix value/ big_endian module to handle negative integers correctly, @panarch (#505)

    πŸ‘ New Contributors

    • @pythonbrad made their first contribution in https://github.com/gluesql/gluesql/pull/496
    • @earney made their first contribution in https://github.com/gluesql/gluesql/pull/510

    Full Changelog: https://github.com/gluesql/gluesql/compare/v0.10.2...v0.11.0

    Source code(tar.gz)
    Source code(zip)
  • v0.10.2(Jan 11, 2022)

    πŸ› Bug Fixes

    # Cargo.toml
    
    [dependencies.gluesql]
    version = "0.10.2"
    default-features = false
    features = ["memory-storage"]
    # or features = ["sled-storage"]
    

    Configuration above now works. memory-storage or sled-storage features were not working in v0.10.1 and it is fixed in v0.10.2.

    • Remove gluesql prefix in dependencies and features @ever0de (#465)
    • Fix src/lib.rs doc comment, @panarch (#469)

    πŸ’‘ Improvements

    • Add --all-targets to cargo test in github rust action @panarch (#467)
    • Support limit, offset clause in Insert into Table Select ~ @devgony (#466)

    Full Changelog: https://github.com/gluesql/gluesql/compare/v0.10.1...v0.10.2

    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Jan 9, 2022)

    🌊 Breaking Changes

    🌈 CLI Support

    $ cargo install gluesql
    

    image

    • Implement CLI application @panarch (#440)
    • Add [[bin]] to Cargo.toml, update cli and storage workspace versions, @panarch (#451)
    • Update cli/ clap version to 3.0.1 @panarch (#449)
    • Change from cli/target to <general>/target in ignore, @ever0de (#443)

    πŸŽ‰ New Data Types

    • INT(8) Add int8 data type @ever0de (#407)
    • DECIMAL Adding data type: Decimal @boomkim (#377)

    πŸš€ Features

    New Functions - EXTRACT & NOW

    • Implementing Extract() & now() Function @simple6192 (#379

    CTAS (CREATE TABLE AS SELECT) support

    • Support CTAS(Create Table As Select ~) statement @devgony (#414)

    Postfix factorial (3! = 6) operator support

    • 385 factorial operator @devil-k (#396)

    SHOW TABLES & SHOW VERSION

    • Add Metadata optional store trait, @panarch (#438)

    Convert the entire project code structure to workspace based

    • Convert gluesql workspace to root lib-package @ever0de (#446)
    • Refactor monorepo @ever0de (#442)

    Changes

    • Update async-recursion & strum_macros versions @panarch (#460)
    • Remove duplicate action @ever0de (#459)
    • Apply Serde to MemoryStorage instance and make it public, @panarch (#453)
    • Remove sorter cfg feature, support all ORDER BY by default @panarch (#450)
    • Repair broken links in README @ever0de (#445)
    • Bump rust version to 1.57 @ever0de (#444)
    • Move join_columns argument from Join::apply() to Join::new() @MRGRAVITY817 (#441)
    • typo edit: bigedian -> bigendian resolves #399 @boomkim (#436)
    • Move order_by from query to select @devgony (#435)
    • Support arithmetic operations for decimal and null @ever0de (#433)

    πŸ› Bug Fixes

    • Fill in the missing #446 @ever0de (#447)
    • Add missing assert macro @ever0de (#434)

    Full Changelog: https://github.com/gluesql/gluesql/compare/v0.9.0...v0.10.1

    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Nov 29, 2021)

    🌊 Breaking Changes

    🌈 New Reference Storage - MemoryStorage

    Now GlueSQL supports two reference storages - SledStorage and MemoryStorage

    • In-memory storage support @panarch (#331)
    • Support AlterTable for MemoryStorage @ever0de (#376)

    πŸŽ‰ New Data Types

    • UUID - add uuid data type @maruoovv (#360)
    • MAP - Add MAP data type and UNWRAP function @panarch (#367)
    • LIST - Add LIST data type, @panarch (#370)

    ✨ New Functions

    • SQRT, POWER - Add Sqrt, Power @simple6192 (#312)
    • RADIANS, DEGREES, PI - Implement radians, degrees, pi math functions #280 @devil-k (#322)
    • LTRIM, RTRIM - Implement Function: LTRIM, RTRIM @devgony (#294)
    • REVERSE - [ADD] - reverse function @zmrdltl (#327)
    • ASIN, ACOS, ATAN - Add functions: ASIN(), ACOS(), ATAN() @boomkim (#296)
    • TRIM - Implement TRIM function - Other features @ever0de (#307)
    • SUBSTR - Implement substr function @vbbono (#341)
    • LOG - Support function LOG @slhmy (#371)
    • REPEAT - Implement REPEAT Function @inhwa1025 (#352)
    • UUID - add function random generate uuid value @maruoovv (#372)
    • AVG - Support aggregation AVG @zmrdltl (#368)

    πŸ’‘ New Expressions

    • % - Implement binary operator modulo % @MRGRAVITY817 (#319)
    • ILIKE & NOT ILIKE - Support ILIKE and NOT ILIKE operator @maruoovv (#334)
    • XOR - Support binary operator XOR, update data-type Int @zmrdltl (#359)
    • CASE - Support conditional function CASE @MRGRAVITY817 (#330)

    πŸš€ Features

    • Apply bigdecimal feature (solved issue) @devgony (#380)
    • Implement CAST from string to DATE, TIME and TIMESTAMP @No-YE (#375)
    • support execute_async @24seconds (#366)
    • CAST from string to INTERVAL @devgony (#335)

    Changes

    • Change tarpaulin version to latest @ever0de (#410)
    • Add PartialEq<Literal> for Value unit tests @yellowHSE (#413)
    • Add Divide unit tests @jiwon-dev (#408)
    • Add literal.rs subtract unit tests @kwon-heejeong (#409)
    • add Null unit case tests for literal.rs @hyangmin82 (#412)
    • Add literal.rs multiply unit tests @heej-ng (#411)
    • Implement prelude pattern to organize userside APIs @MRGRAVITY817 (#388)
    • Support unary operator(plus, minus) unit test @zmrdltl (#406)
    • Supplement remove static lifetime issue @ever0de (#403)
    • Remove 'static lifetime of generic types for GStore @ever0de (#400)
    • Implement SledStorage::check_retry wrapper function @ever0de (#392)
    • Remove explicit uses of TryFrom & TryInto, @panarch (#397)
    • Bump rust version to 1.56 & edition 2021 @ever0de (#395)
    • Apply toml formatting @ever0de (#391)
    • Fix UUID to Uuid to follow the naming convention of Enums @MRGRAVITY817 (#389)
    • Replace eval_to_* func to macro @vbbono (#374)
    • 328 replace macros to functions @devil-k (#365)
    • Remove AstLiteral use in data/row.rs @panarch (#363)
    • Implement implicit null insert. @boomkim (#361)
    • Bump rust version to 1.55 stable @ever0de (#358)
    • Add MemoryStorage integration tests to reach all storage impl codes @panarch (#355)
    • Simplify evaluate module codes by replacing from take(1).. to try_next() @panarch (#347)
    • Add Codecov badge on README @MRGRAVITY817 (#343)
    • Feature test partial @zmrdltl (#332)
    • Apply code coverage test to GitHub Action @MRGRAVITY817 (#326)
    • Update math function MOD to use modulo in Evaluated @MRGRAVITY817 (#321)

    πŸ› Bug Fixes

    • Handle do not match columns and values @ever0de (#356)
    • [Fix, Update] - Partial_Eq error, unit test @zmrdltl (#353)
    • Raise error when column option PRIMARY KEY is used. @heka1024 (#339)

    πŸ‘ New Contributors

    • @simple6192 made their first contribution in https://github.com/gluesql/gluesql/pull/312
    • @devil-k made their first contribution in https://github.com/gluesql/gluesql/pull/322
    • @zmrdltl made their first contribution in https://github.com/gluesql/gluesql/pull/327
    • @boomkim made their first contribution in https://github.com/gluesql/gluesql/pull/296
    • @vbbono made their first contribution in https://github.com/gluesql/gluesql/pull/341
    • @24seconds made their first contribution in https://github.com/gluesql/gluesql/pull/366
    • @slhmy made their first contribution in https://github.com/gluesql/gluesql/pull/371
    • @inhwa1025 made their first contribution in https://github.com/gluesql/gluesql/pull/352
    • @heej-ng made their first contribution in https://github.com/gluesql/gluesql/pull/411
    • @hyangmin82 made their first contribution in https://github.com/gluesql/gluesql/pull/412
    • @kwon-heejeong made their first contribution in https://github.com/gluesql/gluesql/pull/409
    • @jiwon-dev made their first contribution in https://github.com/gluesql/gluesql/pull/408
    • @yellowHSE made their first contribution in https://github.com/gluesql/gluesql/pull/413

    Full Changelog: https://github.com/gluesql/gluesql/compare/v0.8.0...v0.9.0

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Aug 24, 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
A Rust SQL query builder with a pleasant fluent API closely imitating actual SQL

Scooby An SQL query builder with a pleasant fluent API closely imitating actual SQL. Meant to comfortably build dynamic queries with a little bit of s

Aleksei Voronov 98 Sep 12, 2022
Gh-sql - Query GitHub Projects (beta) with SQL

gh-sql: Query GitHub Projects (beta) with SQL Installation gh extension install KOBA789/gh-sql Features SELECT items DELETE items UPDATE item fields

Hidekazu Kobayashi 95 Sep 14, 2022
SQL validator tool for BigQuery standard SQL.

bqvalid What bqvalid does bqvalid is the SQL validator tool for BigQuery standard SQL. bqvalid fails with error message if there's the expression that

null 5 Jun 27, 2022
FeOphant - A SQL database server written in Rust and inspired by PostreSQL.

A PostgreSQL inspired SQL database written in Rust.

Christopher Hotchkiss 27 May 2, 2022
Distributed SQL database in Rust, written as a learning project

toyDB Distributed SQL database in Rust, written as a learning project. Most components are built from scratch, including: Raft-based distributed conse

Erik Grinaker 3.7k Sep 27, 2022
Distributed, version controlled, SQL database with cryptographically verifiable storage, queries and results. Think git for postgres.

SDB - SignatureDB Distributed, version controlled, SQL database with cryptographically verifiable storage, queries and results. Think git for postgres

Fremantle Industries 5 Apr 26, 2022
RisingWave is a cloud-native streaming database that uses SQL as the interface language.

RisingWave is a cloud-native streaming database that uses SQL as the interface language. It is designed to reduce the complexity and cost of building real-time applications. RisingWave consumes streaming data, performs continuous queries, and updates results dynamically. As a database system, RisingWave maintains results inside its own storage and allows users to access data efficiently.

Singularity Data 3.2k Sep 26, 2022
ReadySet is a lightweight SQL caching engine written in Rust that helps developers enhance the performance and scalability of existing applications.

ReadySet is a SQL caching engine designed to help developers enhance the performance and scalability of their existing database-backed applications. W

ReadySet 1.3k Sep 27, 2022
Rust library to parse, deparse and normalize SQL queries using the PostgreSQL query parser

This Rust library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.

pganalyze 28 Sep 19, 2022
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 168 Sep 20, 2022
Fully typed SQL query builder for Rust [deprecated]

What is Deuterium? Deuterium is a fancy SQL builder for Rust. It's designed to provide a DSL to easily build SQL queries in safe and typed way. Like R

Stanislav Panferov 171 Apr 10, 2022
Ormlite - An ORM in Rust for developers that love SQL.

ormlite ormlite is an ORM in Rust for developers that love SQL. It provides the following, while staying close to SQL, both in syntax and performance:

Kurt Wolf 22 Sep 17, 2022
X-Engine: A SQL Engine built from scratch in Rust.

XNGIN (pronounced "X Engine") This is a personal project to build a SQL engine from scratch. The project name is inspired by Nginx, which is a very po

Jiang Zhe 108 Sep 15, 2022
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 8 Jun 1, 2022
An object-relational in-memory cache, supports queries with an SQL-like query language.

qlcache An object-relational in-memory cache, supports queries with an SQL-like query language. Warning This is a rather low-level library, and only p

null 3 Nov 14, 2021
Run SQL queries on CSV files

zsql run SQL queries on csv files A terminal utility to easily run SQL queries on CSV files. zsql is shipped as a small single binary powered by rust

Zizaco 9 Jul 9, 2022
Running SQL-like queries on files.

filesql Running SQL-like queries on files. Features Supported: REPL Basic SQL expressions. INSERT clause. (which inserts data into another file) WHERE

Zhang Li 1 Nov 15, 2021
Tool to automate the visualisation of UML dependencies from a SQL file

Doteur A simple tool to draw your mysql relations from exports. Help us If you use the tool, and like it, don't forget to add a star to the project on

LoΓ―c 87 Sep 7, 2022
Type-safe SQL query wrappers

fnsql   The fnsql crate provides simple type-safe optional wrappers around SQL queries. Instead of calling type-less .query() and .execute(), you call

Dan Aloni 9 Apr 29, 2022