Commit 6abe185
fix(postgres): read EXPLAIN JSON output as json column (#279)
* fix(postgres): read EXPLAIN JSON output as json column
EXPLAIN (FORMAT JSON) returns the plan in a column typed as json, not
text, so reading it into a String failed with "error deserializing
column 0" and the Explain Plan feature never worked on Postgres.
Read the column as a serde_json::Value and re-serialize it for the
parser, falling back to a plain String for Postgres-compatible engines
that hand the plan back as text.
Fixes #276
* Update src-tauri/src/drivers/postgres/explain.rs
Co-authored-by: Dominik Spitzli <dominik@spitzli.dev>
---------
Co-authored-by: Dominik Spitzli <dominik@spitzli.dev>1 parent 6db171b commit 6abe185
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
0 commit comments