Skip to main content

Module code_lens

Module code_lens 

Source
Expand description

Code lenses for unit tests and explain plans.

Places clickable links above SQL statements:

  • “Run Test” above each EXECUTE UNIT TEST statement — dispatches mz-deploy.runTest with the test filter string.
  • “Explain” above CREATE MATERIALIZED VIEW statements and named CREATE INDEX statements — dispatches mz-deploy.runExplain with the fully qualified target (database.schema.object or database.schema.object#index_name).

Functions§

code_lenses 🔒
Build code lenses for tests and explain targets in the file.
find_index_line 🔒
Find the 0-based line number where CREATE INDEX <name> appears.
find_statement_line 🔒
Find the 0-based line number where a statement keyword appears.
find_test_line 🔒
Find the 0-based line number where EXECUTE UNIT TEST <name> appears.