Skip to content

Commit

Permalink
feat: sql type checking and logical plan
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-spacetime committed Sep 17, 2024
1 parent 3fcb505 commit d4779d2
Show file tree
Hide file tree
Showing 12 changed files with 912 additions and 3 deletions.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ members = [
"crates/durability",
"crates/fs-utils",
"crates/lib",
"crates/planner",
"crates/metrics",
"crates/primitives",
"crates/sats",
Expand Down
8 changes: 7 additions & 1 deletion crates/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ pub fn from_hex_pad<R: hex::FromHex<Error = hex::FromHexError>, T: AsRef<[u8]>>(
hex: T,
) -> Result<R, hex::FromHexError> {
let hex = hex.as_ref();
let hex = if hex.starts_with(b"0x") { &hex[2..] } else { hex };
let hex = if hex.starts_with(b"0x") {
&hex[2..]
} else if hex.starts_with(b"X'") {
&hex[2..hex.len()]
} else {
hex
};
hex::FromHex::from_hex(hex)
}
17 changes: 17 additions & 0 deletions crates/planner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "spacetimedb-query-planner"
version.workspace = true
edition.workspace = true
license-file = "LICENSE"

[dependencies]
derive_more.workspace = true
thiserror.workspace = true
spacetimedb-lib.workspace = true
spacetimedb-sats.workspace = true
spacetimedb-schema.workspace = true
spacetimedb-sql-parser.workspace = true

[dev-dependencies]
spacetimedb-lib.workspace = true
spacetimedb-primitives.workspace = true
Empty file added crates/planner/LICENSE
Empty file.
1 change: 1 addition & 0 deletions crates/planner/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod logical;
Loading

0 comments on commit d4779d2

Please sign in to comment.