Skip to content

Commit

Permalink
Sqlite explain graph (launchbadge#3064)
Browse files Browse the repository at this point in the history
* convert logger to output a query graph

* avoid duplicating branch paths to shrink output graph

* separate different branching paths

* include all branches which found unique states

* track the reason for ending each branches execution

* track the result type of each branch

* make edges rely on history index instead of program_id, to avoid errors when looping

* add state diff to query graph

* drop redundant table info

* rework graph to show state changes, rework logger to store state snapshots

* show state on the previous operation

* gather duplicate state changes into clusters to reduce repetition

* draw invisible connections between unknown instructions by program_i

* clean up dot format string escaping

* add test case from launchbadge#1960 (update returning all columns)

* add tests for launchbadge#2939 (update returning only the PK column)

* allow inserting into a table using only the index

* improve null handling of IfNull, fix output type of NewRowId

* add NoResult nodes for branches which don't log a result, as a sanity check

* add short-circuit to all logging operations

* remove duplicate logging checks, and make logging enabled/disabled consistently depend on sqlx::explain instead of sqlx for capture & sqlx::explain for output

* add failing test for awkwardly nested/filtered count subquery

* handle special case of return operation to fix failing test

* require trace log level instead of using whatever log level  statement logging was configured to use
  • Loading branch information
tyrelr authored and jrasanen committed Oct 14, 2024
1 parent 9510f35 commit d17d46b
Show file tree
Hide file tree
Showing 5 changed files with 827 additions and 211 deletions.
Loading

0 comments on commit d17d46b

Please sign in to comment.