Skip to content

INTARYNX/sqlwayfarer

Repository files navigation

SQL Wayfarer

Navigate, analyze, and document your SQL Server databases — directly inside VS Code.

VS Code Marketplace GitHub

Early Access — Core features are stable and actively developed. Feedback and bug reports are welcome via GitHub Issues.


Overview

SQL Wayfarer is a VS Code extension that turns your editor into a full SQL Server workspace. Connect to any SQL Server or Azure SQL database, browse your schema, inspect object code and structure, run queries, trace dependencies down to the column level, generate scripts, and manage documentation — without leaving VS Code.


Features

Connection Management

  • Save and switch between multiple SQL Server connections
  • Secure credential storage integrated with VS Code
  • Connection testing with live feedback

Schema Explorer

  • Browse databases, schemas, tables, views, stored procedures, and functions
  • Filterable object list organized by schema and type, with live match counts per schema
  • Search in code: find every view, procedure, function, or trigger whose definition mentions a given text ("where is this column used?")
  • Table statistics at a glance: each table shows a badge with its row count and reserved size (e.g. 1.2M · 340 MB), loaded from allocation metadata in a single query — instant even on very large databases
  • ▶ Top 10 button on tables and views to peek at data instantly
  • Native Ctrl+F search across object lists, code, and query results

Object Inspector

Tab What you see
Structure Columns (with per-column usage — see Column Lineage), data types, primary keys, foreign keys, indexes, plus row count and disk usage breakdown (data / indexes / reserved)
Tree Dependency tree for the selected object, expandable to a configurable depth
Graph Rendered dependency graph showing what depends on the object and what it depends on
Code Syntax-highlighted T-SQL with line metrics and one-click copy
Comments Editable extended properties and inline documentation

Query Tool

  • Run free-form T-SQL against the selected database, with multiple result sets, a configurable row cap, and cancellation of long-running queries
  • Schema-aware autocompletion: object names, schema-prefixed lookups, and alias-resolved column suggestions (FROM Employee ee. lists Employee's columns)
  • Go to definition: Ctrl+Click (Cmd+Click on macOS) an object name — aliases included — to jump to it in the Explorer
  • Destructive statement guardrails: UPDATE/DELETE without a WHERE clause (detected by a real T-SQL parser, so batches and subqueries are analyzed correctly), TRUNCATE TABLE, and DROP require explicit confirmation before running
  • Copy / CSV export on every result set: tab-separated copy that pastes straight into Excel, and CSV export with RFC 4180 escaping and a UTF-8 BOM so accents survive Excel
  • Persistent query history with deduplication

Script Generator

A 📜 button on every object in the Explorer generates ready-to-edit scripts straight into the Query tab (without running them):

  • Tables: SELECT with all columns, INSERT/UPDATE templates with typed placeholders and a primary-key WHERE, and full CREATE TABLE DDL (identity, computed columns, defaults, primary key, secondary indexes, foreign keys with cascade rules)
  • Procedures: EXEC template with typed parameters, declared OUTPUT variables, and a result SELECT
  • Functions: call template for scalar and table-valued functions
  • Views / procedures / functions: the full CREATE definition

Dependency Analysis

  • Visualize which objects depend on a given object and which objects it depends on, as a tree or as a graph
  • See the actual operation performed on each dependency (SELECT, INSERT, UPDATE, DELETE, MERGE), extracted by parsing the object's T-SQL definition — aliased targets (UPDATE t … FROM Task t) are resolved to the real table
  • Understand the full impact of a change before making it

Column-Level Lineage

"What breaks if I rename this column?"

  • Every view, procedure, function, and trigger definition is parsed (Babelfish T-SQL grammar) during indexing to record which columns of which tables it reads or writes
  • The Structure tab shows a Used by badge per column: how many objects reference it, which ones write to it (✍), and which matches are ambiguous (~)
  • Click the badge to list the referencing objects and jump to any of them in the Explorer
  • Alias resolution, CTE exclusion, MERGE targets, and trigger inserted/deleted pseudo-tables are handled

Documentation

  • Read and write MS_Description extended properties directly from the panel
  • Data dictionary export: generate a complete Markdown data dictionary of the database — every table, view, procedure, and function with columns, keys, parameters, cross-linked dependencies, and your extended-property descriptions

Local Schema Index

  • Schema, dependency, and column-lineage metadata are indexed locally per connection, so browsing, dependency, and lineage lookups stay fast after the first scan
  • Incremental refresh: when the schema changes, only added or modified objects are re-analyzed; a full rebuild only happens on first indexing or Force Reindex
  • Real per-object progress reporting, cancellable at any time

Getting Started

  1. Install SQL Wayfarer from the VS Code Marketplace.
  2. Click the compass icon in the Activity Bar to open the panel.
  3. Add a connection using your SQL Server credentials.
  4. Select a database and start exploring.

You can also open the panel via Ctrl+Shift+POpen SQL Wayfarer.


Requirements

Requirement Minimum version
VS Code 1.100+
SQL Server 2017+ (table details rely on STRING_AGG)
Azure SQL Any tier
Permissions db_datareader for browsing and dependency analysis; VIEW DATABASE STATE for table size/row-count badges (optional — the Explorer simply shows no badges without it); ALTER on the target objects to read/write extended properties (Comments)

Known Limitations

  • Encrypted object definitions cannot be retrieved by design (SQL Server restriction).
  • Very large databases may experience slower initial indexing (each code object is parsed once for dependencies and column lineage; subsequent refreshes are incremental).
  • T-SQL syntax highlighting covers standard cases; complex dialect features may not be fully highlighted.
  • Dependency operations and column lineage are detected via static analysis of T-SQL: dynamic SQL (EXEC of a string), calls through another procedure, or references used only as a parameter type are shown without a specific operation.
  • Column lineage favors recall over precision: an unqualified column in a multi-table statement is attributed to every table in scope and flagged as ambiguous (~) rather than dropped.

Contributing

Bug reports and feature requests are tracked on GitHub Issues. Pull requests are welcome.


SQL Wayfarer — built for developers who spend their days navigating complex databases.

About

Navigate and explore SQL Server databases directly within VS Code. View tables, procedures, dependencies, and more

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages