edgedb-cli
edgedb-cli copied to clipboard
Extra analyze commands
Analyze Command
edgedb analyze "SELECT ..."
Options:
--expand show full tree
--debug-output-file PATH
--read-json PATH read 2format json instead of running query
Analyze options:
--no-execute no analyze (assumes edgedb/edgedb#5212)
--buffers
Expanded (Verbose) mode
edgedb> ANALYZE SELECT ...;
[... short output ...]
Use `\expand` to see more info
edgedb> \expand
[... long output ...]
As it is a generic name, it's also a synonym to \last-error
if last thing that happened was error instead of analyze (it actually took me some time to remember that command name, so I think it's quite useful).
Analyze command in REPL
Since we tend to support most CLI command in interactive modes to, here is how it will work:
edgedb> \analyze
Repeats last query prefixing by analyze
, options might be specified too. If last query was analyze
, just repeats the same thing with possibly modified queries./
Similarly:
edgedb> \analyze --debug-output-file file.json
Same as above but dumps output into file.json
This one, works like in non-interactive:
edgedb> \analyze --read-json file.json
Reads file and draws a tree, just like non-interactive command
Just in the case:
edgedb> \analyze --expand
Works exactly like \expand
This will probably work just because how our commands work, but not recommended:
edgedb> \analyze "SELECT ..."
Update1: explain -> analyze
Update2: \analyze
prefixes the command with analyze
if needed rather than just using last analysis found.
Update3: \verbose
-> \expand