diff --git a/Cargo.lock b/Cargo.lock index e8bbd95b21..de01d88168 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1344,6 +1344,10 @@ dependencies = [ "sqlbuild-core", ] +[[package]] +name = "sqlbuild-orchestration" +version = "0.0.0" + [[package]] name = "sqlbuild-project" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index c31227234f..0d02574239 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ + "crates/sqlbuild-orchestration", "crates/sqlbuild-build-features", "crates/sqlbuild-core", "crates/sqlbuild-cursor", @@ -30,6 +31,7 @@ resolver = "2" [workspace.metadata.native-layers] order = [ "sqlbuild-build-features", + "sqlbuild-orchestration", "sqlbuild-core", "sqlbuild-cursor", "sqlbuild-state", diff --git a/crates/sqlbuild-orchestration/Cargo.toml b/crates/sqlbuild-orchestration/Cargo.toml new file mode 100644 index 0000000000..c8f7d83f2d --- /dev/null +++ b/crates/sqlbuild-orchestration/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "sqlbuild-orchestration" +version = "0.0.0" +edition = "2024" +publish = false + +[lib] +path = "src/lib.rs" diff --git a/crates/sqlbuild-orchestration/src/lib.rs b/crates/sqlbuild-orchestration/src/lib.rs new file mode 100644 index 0000000000..55c88cbf3d --- /dev/null +++ b/crates/sqlbuild-orchestration/src/lib.rs @@ -0,0 +1 @@ +pub mod store; diff --git a/crates/sqlbuild-orchestration/src/store/mod.rs b/crates/sqlbuild-orchestration/src/store/mod.rs new file mode 100644 index 0000000000..49ef9de033 --- /dev/null +++ b/crates/sqlbuild-orchestration/src/store/mod.rs @@ -0,0 +1 @@ +pub mod scratch_reader; diff --git a/crates/sqlbuild-orchestration/src/store/scratch.sql b/crates/sqlbuild-orchestration/src/store/scratch.sql new file mode 100644 index 0000000000..ea6aaf5c83 --- /dev/null +++ b/crates/sqlbuild-orchestration/src/store/scratch.sql @@ -0,0 +1,4 @@ +CREATE TABLE IF NOT EXISTS sqb_scratch_orders ( + order_id TEXT PRIMARY KEY, + shipped_note TEXT +); diff --git a/crates/sqlbuild-orchestration/src/store/scratch_reader.rs b/crates/sqlbuild-orchestration/src/store/scratch_reader.rs new file mode 100644 index 0000000000..79a4227863 --- /dev/null +++ b/crates/sqlbuild-orchestration/src/store/scratch_reader.rs @@ -0,0 +1,10 @@ +pub const SCRATCH_ORDER_IDS: &str = "SELECT order_id FROM sqb_scratch_orders"; + +pub enum ScratchState { + Open, + Closed, +} + +pub fn scratch_state() -> ScratchState { + ScratchState::Open +}