diff --git a/Cargo.lock b/Cargo.lock index 7cf074b..00bb413 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -933,7 +933,7 @@ dependencies = [ [[package]] name = "sql-insight" -version = "0.4.0" +version = "0.5.0" dependencies = [ "serde", "sqlparser", @@ -943,7 +943,7 @@ dependencies = [ [[package]] name = "sql-insight-cli" -version = "0.3.0" +version = "0.4.0" dependencies = [ "assert_cmd", "clap", diff --git a/README.md b/README.md index 39f4c95..6c4df30 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ across every SQL dialect sqlparser-rs supports. ```toml [dependencies] -sql-insight = "0.4" +sql-insight = "0.5" ``` ## Usage @@ -181,7 +181,7 @@ serde format: ```toml [dependencies] -sql-insight = { version = "0.4", features = ["serde"] } +sql-insight = { version = "0.5", features = ["serde"] } ``` ```rust,ignore diff --git a/sql-insight-cli/CHANGELOG.md b/sql-insight-cli/CHANGELOG.md index 0936cc3..1d5b914 100644 --- a/sql-insight-cli/CHANGELOG.md +++ b/sql-insight-cli/CHANGELOG.md @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.0](https://github.com/takaebato/sql-insight/compare/sql-insight-cli-v0.3.0...sql-insight-cli-v0.4.0) - 2026-07-26 + +### ⚠️ Breaking Changes + +#### inherit sql-insight 0.5.0's analysis changes + +The bundled library moves to sql-insight 0.5.0, so the `extract` +output changes for the same SQL: wildcards now expand into per-column +reads and lineage when their columns are fully known, and lineage no +longer emits synthetic alias-named sources for `VALUES` / table-function +relations. See the +[sql-insight 0.5.0 changelog](https://github.com/takaebato/sql-insight/blob/master/sql-insight/CHANGELOG.md) +for the details and the long list of correctness fixes it also brings. + +### Fixed + +- track quote and comment state when splitting interactive CLI statements ([#78](https://github.com/takaebato/sql-insight/pull/78)) by @takaebato + +### Other Changes + +- rename the security-audit workflow to cargo-deny and add its badge ([#64](https://github.com/takaebato/sql-insight/pull/64)) by @takaebato + ## [0.3.0](https://github.com/takaebato/sql-insight/compare/sql-insight-cli-v0.2.1...sql-insight-cli-v0.3.0) - 2026-07-05 ### ⚠️ Breaking Changes diff --git a/sql-insight-cli/Cargo.toml b/sql-insight-cli/Cargo.toml index cc5c0e8..d8439ec 100644 --- a/sql-insight-cli/Cargo.toml +++ b/sql-insight-cli/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" # Bump the MINOR by hand (pre-1.0 breaking) when the CLI's output *format* changes # — stdout shape or `--format json` structure — vs a value-only change (patch). # Manual: tooling sees the API surface, not output/behaviour. -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } homepage = { workspace = true } repository = { workspace = true } @@ -43,7 +43,7 @@ doc = false # A breaking sql-insight bump (one the current caret requirement won't accept) # means: update the requirement + bump the CLI minor by hand. Compatible bumps # the caret already accepts flow automatically — no CLI release. -sql-insight = { path = "../sql-insight", version = "0.4.0", features = ["serde"] } +sql-insight = { path = "../sql-insight", version = "0.5.0", features = ["serde"] } clap = { version = "4.5", features = ["derive"] } clap_complete = "4.5" clap_mangen = "0.3" diff --git a/sql-insight/CHANGELOG.md b/sql-insight/CHANGELOG.md index dfbda7e..090511a 100644 --- a/sql-insight/CHANGELOG.md +++ b/sql-insight/CHANGELOG.md @@ -7,6 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.5.0](https://github.com/takaebato/sql-insight/compare/sql-insight-v0.4.0...sql-insight-v0.5.0) - 2026-07-26 + +### ⚠️ Breaking Changes + +#### trace statement-materialized relations into their inputs ([#69](https://github.com/takaebato/sql-insight/pull/69)) by @takaebato + +Previously, a reference through a statement-local relation (a `VALUES` +derived table, or a table function such as `UNNEST`) stopped at a +synthetic lineage source named after the relation's alias (`v.x` for +`(VALUES (1)) AS v(x)`). The trace now continues into the relation's +inputs: a `VALUES`-backed column traces to the referenced cell's own +sources, and a table function's outputs trace to the function's argument +columns at function granularity (`Transformation`). Lineage sources are +now always *written* references, and a constant cell contributes no +edge. Consumers keying on the old alias-named sources will instead see +the underlying columns, or no edge where only constants flow. + +#### expand wildcards when the covered columns are fully known ([#67](https://github.com/takaebato/sql-insight/pull/67)) by @takaebato + +Previously, every `*` / `t.*` stayed unexpanded and surfaced only a +`WildcardSuppressed` diagnostic. A wildcard now expands into per-column +outputs whenever the columns it covers are completely known, from the +catalog for base tables or from the SQL itself for derived tables and +CTEs: each expanded column surfaces as a read (one per wildcard +occurrence, anchored at the `*` token) and in lineage with determinate +positions, which also unlocks positional DML pairing through the +projection. Expansion is all-or-nothing per wildcard: one that can't be +expanded completely (unknown columns, dialect modifiers such as +`EXCLUDE`, a merged `USING` scope) stays suppressed and flagged exactly +as before. Consumers that treated `WildcardSuppressed` as the universal +wildcard marker will now receive concrete columns whenever expansion +succeeds. + +### Added + +- expose a data-modifying CTE's RETURNING as its output columns ([#79](https://github.com/takaebato/sql-insight/pull/79)) by @takaebato + +### Fixed + +- scope DISTINCT ON keys over the projection outputs ([#77](https://github.com/takaebato/sql-insight/pull/77)) by @takaebato +- close the remaining audited correctness gaps across dialect corners ([#76](https://github.com/takaebato/sql-insight/pull/76)) by @takaebato +- make pipe operators evolve the running scope correctly ([#75](https://github.com/takaebato/sql-insight/pull/75)) by @takaebato +- close resolution and trace gaps across CTE, APPLY, USING, and derived tables ([#74](https://github.com/takaebato/sql-insight/pull/74)) by @takaebato +- stop DML binder paths from silently losing writes and reads ([#72](https://github.com/takaebato/sql-insight/pull/72)) by @takaebato +- correct wildcard handling in FROM-first selects, pipe SELECT *, and ON CONFLICT lineage ([#71](https://github.com/takaebato/sql-insight/pull/71)) by @takaebato +- resolve an unqualified conflict-action reference as ambiguous ([#68](https://github.com/takaebato/sql-insight/pull/68)) by @takaebato + +### Other Changes + +- rename the security-audit workflow to cargo-deny and add its badge ([#64](https://github.com/takaebato/sql-insight/pull/64)) by @takaebato + ## [0.4.0](https://github.com/takaebato/sql-insight/compare/sql-insight-v0.3.0...sql-insight-v0.4.0) - 2026-07-05 ### ⚠️ Breaking Changes diff --git a/sql-insight/Cargo.toml b/sql-insight/Cargo.toml index 7f61869..3649305 100644 --- a/sql-insight/Cargo.toml +++ b/sql-insight/Cargo.toml @@ -10,7 +10,7 @@ include = [ "LICENSE.txt", ] readme = "README.md" -version = "0.4.0" +version = "0.5.0" edition = { workspace = true } rust-version = "1.89.0" homepage = { workspace = true }