Rhenium for Oracle SQL and PL/SQL
Rhenium adds formatting, JSON conversion, and workspace-aware PL/SQL IntelliSense
to Visual Studio Code. Find its commands in the editor context menu under
Rhenium or in the Command Palette.
Format commands process the selected text, or the whole document when there is
no selection.
- Align aligns code around
:= and =>; multiple selected blocks are
aligned separately.
- Code to lowercase converts SQL and PL/SQL code without changing strings
or comments.
- Normalize local prefixes changes nonstandard
v_ local prefixes to l_.
- PCK_TS_LOG to PCK_LOG_RS replaces the old logger name in Oracle SQL files.
- Remove Quotes from Identifiers removes quotes from quoted identifiers.
- Cleanup Cart Export makes Oracle SQL Developer cart exports easier to
read.
- Normalize Comma Placement moves leading commas to the ends of the
previous lines.
Convert
Convert commands require selected JSON text.
- JSON to JSON_(OBJECT/ARRAY) creates PL/SQL
JSON_OBJECT or JSON_ARRAY
code.
- JSON to JSON_TABLE creates a PL/SQL
JSON_TABLE expression.
PL/SQL IntelliSense (Experimental)
Cache-backed IntelliSense is experimental and disabled by default. It uses a
local workspace cache; it does not connect to an Oracle database. Rhenium
analyzes configured packages, standalone procedures and functions, triggers,
types, views, and materialized views so VS Code can offer:
- Go to Definition and Go to Declaration.
- Find All References and Call Hierarchy.
- Hover information, including PL/Doc comments when available.
- Signature Help, Workspace Symbols, and CodeLens.
Get started
- Install the
Oracle SQL Developer extension for VS Code
to provide the
PL/SQL (oracle-sql) language mode.
- Set
rhenium.experimentalIntelliSenseEnabled to true and reload VS Code.
- Configure
rhenium.filePatterns for your workspace. Patterns must be
grouped under a named reference context; there is no implicit default.
- Associate your SQL files with
PL/SQL (oracle-sql) and open a PL/SQL
document to activate Rhenium.
- From the editor context menu, choose Rhenium > IntelliSense Cache > Reset
cache.db and refresh all documents to build the initial cache. Follow
progress in the VS Code status bar.
- Refresh cache.db with new and changed documents updates only new and
changed files.
- Refresh cache.db with new, changed and failed documents also retries
files that previously failed.
- Reset cache.db and refresh all documents rebuilds the cache from scratch.
- Stop background parser worker stops background indexing.
- Add current document to cache.db exclude list excludes the open document
from indexing.
Saving configured files updates the cache automatically. The status bar shows
the active document's state and workspace progress through parsing and
reference resolution. Click it during indexing to stop work and release parser
workers; click the stopped indicator to start a new refresh. When indexing is
idle, click it to view synchronization details.
Set rhenium.computeConcurrency to adjust the number of parallel workers. The
default is 4; higher values can use more CPU. Add workspace-relative paths to
rhenium.excludeDocumentFiles to keep specific files out of the cache.
For the full guides and feature documentation, choose Rhenium > Show Docs
from the editor context menu.