Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 73 additions & 34 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,55 +1,94 @@
[package]
name = "gluesql"
version = "0.5.0"
authors = ["Taehoon Moon <taehoon.moon@outlook.com>"]
version = "0.6.0-planner-beta"
authors = ["Taehoon Moon <taehoon.moon@outlook.com>", "Kyran Gostelow <kyran@gostelow.me>"]
edition = "2018"
description = "GlueSQL - Open source SQL database engine fully written in Rust with pure functional execution layer, easily swappable storage and web assembly support!"
license = "Apache-2.0"
repository = "https://github.com/gluesql/gluesql"
documentation = "https://docs.rs/gluesql/"
readme = "README.md"
keywords = ["sql-database", "sql", "functional", "no-mut-in-the-middle", "webassembly"]
keywords = ["sql-database", "sql", "functional", "webassembly"]

[package.metadata.docs.rs]
all-features = true

[features]
default = ["sled-storage", "alter-table", "expanded-api", "auto-increment"]
default = [
# Storages
"sled-storage",
"csv-storage",
# Performance
"multithreading",# TODO: Multithreading optional (Remove uses without CFG)
# Functionality
"alter-table",
"auto-increment",
# Data
"double_quote_strings",
"implicit_float_conversion",
# API
"expanded-api",
]

# ALTER TABLE is optional.
# You can include whether ALTER TABLE support or not for your custom database implementation.
alter-table = []
auto-increment = []
# Storages
sled-storage = ["sled", "bincode"]
csv-storage = ["csv", "linecount"]

expanded-api = ["serde_json"]
# Performance
multithreading = ["rayon"]

# Functionality
alter-table = []
auto-increment = []

# Data
double_quote_strings = []
implicit_float_conversion = []

# API
expanded-api = ["serde_json"]

# Who wants to make a custom storage engine,
# default storage engine sled-storage is not required.
sled-storage = ["sled", "bincode"]

[dependencies]
async-trait = "0.1.41"
async-recursion = "0.3.1"
boolinator = "2.4.0"
futures = "0.3"
indexmap = "1.6.0"
im-rc = "15.0.0"
iter-enum = "0.2.4"
itertools = "0.9.0"
pin-project = "1.0.1"
serde = { version = "1.0.117", features = ["derive"] }
sqlparser = { version = "0.8.0", features = ["serde"] }
thiserror = "1.0.21"
fstrings = "0.2.3"
regex = "1"

# OPTIONAL DEPENDENCIES
# dependencies for sled-storage
serde_json = { version = "1.0.0", optional = true }

# dependencies for sled-storage
bincode = { version = "1.3.1", optional = true }
sled = { version = "0.34.6", optional = true }
async-trait = "0.1.41"
async-recursion = "0.3.1"
boolinator = "2.4.0"
futures = "0.3"
indexmap = "1.6.0"
im-rc = "15.0.0"
iter-enum = "0.2.4"
itertools = "0.9.0"
pin-project = "1.0.1"
serde = { version = "1.0.117", features = ["derive"] }
sqlparser = { version = "0.8.0", features = ["serde"] }
thiserror = "1.0.21"
fstrings = "0.2.3"
regex = "1"
chrono = { version = "0.4.19", features = ["serde", "unstable-locales"] }

# OPTIONAL DEPENDENCIES
# Multiple
# Sled and Expanded API
serde_json = { version = "1.0.0", optional = true }

# Storages
# Sled
bincode = { version = "1.3.1", optional = true }
sled = { version = "0.34.6", optional = true }

# CSV
csv = { version = "1.1.6", optional = true }
linecount = { version = "0.1.0", optional = true }

# Performance
# Multithreading
rayon = { version = "1.5.0", optional = true }

# Functionality

# Data

# API

[dev-dependencies]
tokio = { version = "0.3.3", features = ["macros", "rt"] }
Expand Down
7 changes: 4 additions & 3 deletions examples/api_usage.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
#[cfg(feature = "sled-storage")]
use futures::executor::block_on;
#[cfg(feature = "sled-storage")]
Expand Down Expand Up @@ -36,12 +37,12 @@ fn mutable_api() {
for query in parse(sqls).unwrap() {
glue.execute(&query).unwrap();
}
}
}*/

fn main() {
#[cfg(feature = "sled-storage")]
{
mutable_api();
immutable_api();
/*mutable_api();
immutable_api();*/
}
}
8 changes: 4 additions & 4 deletions examples/hello_world.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "sled-storage")]
/*#[cfg(feature = "sled-storage")]
mod hello_world {
use gluesql::{parse, Glue, Payload, SledStorage, Value};

Expand Down Expand Up @@ -64,8 +64,8 @@ mod hello_world {
println!("Hello {}!", to_greet); // Will always output "Hello World!"
}
}

*/
fn main() {
#[cfg(feature = "sled-storage")]
hello_world::run();
/*#[cfg(feature = "sled-storage")]
hello_world::run();*/
}
7 changes: 4 additions & 3 deletions examples/sled_multi_threaded.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
#[cfg(feature = "sled-storage")]
mod sled_multi_threaded {
use {
Expand Down Expand Up @@ -73,8 +74,8 @@ mod sled_multi_threaded {
println!("Hello {}!", to_greet); // Will typically output "Hello Foo!" but will sometimes output "Hello World!"; depends on which thread finished first.
}
}

*/
fn main() {
#[cfg(feature = "sled-storage")]
sled_multi_threaded::run();
/*#[cfg(feature = "sled-storage")]
sled_multi_threaded::run();*/
}
4 changes: 2 additions & 2 deletions examples/using_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use gluesql::{parse, sled, Glue, SledStorage};

#[cfg(feature = "sled-storage")]
fn main() {
let config = sled::Config::default()
/*let config = sled::Config::default()
.path("data/using_config")
.temporary(true)
.mode(sled::Mode::HighThroughput);
Expand All @@ -24,7 +24,7 @@ fn main() {

for query in parse(sqls).unwrap() {
glue.execute(&query).unwrap();
}
}*/
}

#[cfg(not(feature = "sled-storage"))]
Expand Down
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#hard_tabs = true
171 changes: 0 additions & 171 deletions src/data/literal.rs

This file was deleted.

6 changes: 2 additions & 4 deletions src/data/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
mod literal;
mod row;
pub mod schema;
mod table;
pub mod value;

pub use {
literal::{Literal, LiteralError},
row::{bulk_build_rows_expr, bulk_build_rows_row, Row, RowError},
row::{Row, RowError},
schema::Schema,
table::{get_name, Table, TableError},
value::{Value, ValueError},
value::*,
};
Loading