Skip to content

Commit e21029c

Browse files
authored
Merge pull request #16 from boringSQL/chore-introspect
chore: move introspection logic into pg_introspect
2 parents 7a9f594 + b8e3c4a commit e21029c

16 files changed

Lines changed: 820 additions & 1026 deletions

File tree

Cargo.lock

Lines changed: 17 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dbg_macro = "deny"
1313

1414
[workspace.dependencies]
1515
dry_run_core = { path = "crates/dry_run_core" }
16+
pg_introspect = "0.2.0"
1617
async-trait = "0.1"
1718
chrono = { version = "0.4", features = ["serde"] }
1819
clap = { version = "4", features = ["derive", "env"] }

crates/dry_run_cli/src/mcp/server.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,11 @@ impl DryRunServer {
15541554
annotated.schema.tables.len(),
15551555
annotated.schema.views.len(),
15561556
annotated.schema.functions.len(),
1557-
if annotated.planner.is_some() { "yes" } else { "no" },
1557+
if annotated.planner.is_some() {
1558+
"yes"
1559+
} else {
1560+
"no"
1561+
},
15581562
annotated.activity_by_node.len(),
15591563
);
15601564
*self.schema.write().await = Some(annotated);

crates/dry_run_core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition.workspace = true
66
[dependencies]
77
async-trait = { workspace = true }
88
chrono = { workspace = true }
9+
pg_introspect = { workspace = true }
910
pg_query = { workspace = true }
1011
regex = { workspace = true }
1112
rusqlite = { workspace = true }
@@ -20,5 +21,6 @@ tracing = { workspace = true }
2021
zstd = { workspace = true }
2122

2223
[dev-dependencies]
24+
indexmap = "2"
2325
tokio = { workspace = true }
2426
tempfile = "3"

0 commit comments

Comments
 (0)