Files
vsc-t-sql-strings/README.md
T
2026-11-20 15:35:31 +00:00

40 lines
1.9 KiB
Markdown

# T-SQL Strings
Syntax highlighting for dynamic T-SQL inside string literals in VS Code.
## Features
- **Dynamic SQL highlighting** — Highlights common T-SQL keywords, functions, data types, operators, and variables inside string literals.
- **Multiline SQL support** — Recognizes dynamic SQL statements spanning multiple lines.
- **Escaped string handling** — Handles doubled single quotes (`''`) commonly used in dynamic T-SQL.
- **Variable highlighting** — Recognizes local variables (`@variable`) and system variables (`@@ROWCOUNT`).
- **String concatenation** — Highlights recognizable SQL syntax in individual string fragments, including concatenated expressions.
- **Standard SQL compatibility** — Preserves highlighting for ordinary SQL statements and non-SQL string literals.
- **Theme integration** — Uses standard TextMate scopes to integrate with VS Code color themes.
## Requirements
No additional runtime dependencies are required.
## Extension Settings
This extension does not contribute any configurable settings.
Syntax highlighting is applied automatically to supported SQL documents.
## Limitations
T-SQL Strings uses TextMate grammars and regular expressions rather than a full T-SQL parser. Syntax highlighting is therefore based on recognizable patterns rather than a complete understanding of the SQL code.
- **SQL detection** — Dynamic SQL strings that do not match recognized patterns may retain standard string highlighting.
- **Complex expressions** — Deeply nested string literals, unusual quoting patterns, and advanced dynamic SQL constructions may not always be highlighted correctly.
- **Syntax coverage** — Less common T-SQL constructs may not receive specialized highlighting.
The extension provides syntax highlighting only. It does not reconstruct dynamically generated queries, validate SQL syntax, execute statements, or provide IntelliSense.
## Release Notes
### 1.0.0
Initial release of T-SQL Strings.