The SQL Developer team is planning to release an SDK for their Oracle SQL Developer Extension for VSCode.
This Gist contains a list of features we would like to see in the SDK.
- Query all database connections managed by SQLDev
- Get all Properties of a connection including status (connected/closed)
- Set properties of a connection
- Save a connection
- Create a new connection
- Clone a connection
- Delete a connection
- Open a connection
- Close a connection
- Execute SQL over a connection
- Get the connection of an editor
- Set the connection of an editor (including "none")
Navigate to a database object. Similar to the capabilities provided by the hyperlink column in SQLDev classic SQLDEV:LINK :<object_owner>:<object_type>:<object_name>[:<line>:<col>][:<label>]:<drill_class>
.
- Navigate to the code, optionally specifying the line/code, and open an editor (using the virtual file system for database objects):
- Function
- Procedure
- Trigger
- Package Spec
- Package Body
- Type Spec
- Type Body
- Navigate to database objects as if the user were navigating the connection tree
- Table/Column
- View/Column
- Index
- Package/Element
- Procedure
- Function
- Operator
- Queue
- Queue tables
- Trigger
- Type/Element
- Sequence
- Materialized View
- Materialized View Log
- Synonyms
- Public Synonym
- Database Link
- Public Database Link
- Directory
- Edition
- Java
- JavaScript
- Job
- ...
The idea is to provide an alternative formatter as extension while keeping the functionality of SQLDev "as is". The user can configure which formatter to use in VS Code (part of the product). Behind the scenes we use SQLDev's formatter with custom settings and a custom Arbori program.
- Run the formatter with custom settings
- A list of key/value pairs, similar to "Advanced Format" in SQLDev classic
- A Arbori program with JavaScript callbacks
The problem with variant a) is that the grammar may change with each version of SQLDev and this may break the custom formatter.
To solve this problem, we could bundle specific versions of the JARs containing everything the formatter needs into our own extension. Using libs from Maven Centrel would be perfect, otherwise we would have to grab the right set of libs from a SQLcl distribution.