Skip to content

Commit 6488ffe

Browse files
authored
Prepare @oracle/sql-developer-api 25.2.0 release (#5)
* chore: remove unused files * feat: prepare @oracle/sql-developer-api 25.2.0 release * fix: add back the accidently removed changes * style: fix minor styling issue in the readme
1 parent 28cb262 commit 6488ffe

File tree

11 files changed

+254
-435
lines changed

11 files changed

+254
-435
lines changed

extension-api/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*
22
!dist/*
3+
!CHANGELOG.md
4+
!SECURITY.md

extension-api/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog for @oracle/sql-developer-api
2+
3+
## 25.2.0 - July 2025
4+
- Features:
5+
- Add support for attaching worksheets to a connection session.
6+
- Add support for preparing SQL (i.e. extracting binds, substitutions, SQL id, ..etc).
7+
- Bug fixes:
8+
- Fix exported enums are unusable.
9+
- Ensure all types are exported.
10+
11+
## 25.1.0 - July 2025
12+
Initial Release

extension-api/README.md

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
[TOC]
1+
# Table of Contents <!-- omit in toc -->
2+
3+
- [Introduction](#introduction)
4+
- [Getting Started](#getting-started)
5+
- [Prerequisites](#prerequisites)
6+
- [Install `Oracle SQL Developer Extension for VSCode`](#install--oracle-sql-developer-extension-for-vscode-)
7+
- [Install Typescript:](#install-typescript-)
8+
- [Install Type definitions for VSCode](#install-type-definitions-for-vscode)
9+
- [Installation](#installation)
10+
- [Usage](#usage)
11+
- [Connections](#connections)
12+
- [Worksheets](#worksheets)
13+
- [Contributing](#contributing)
14+
- [Security](#security)
15+
- [License](#license)
216

317
# Introduction
418

@@ -14,45 +28,52 @@ Provides Typescript type definitions for the API exposed by [Oracle SQL Develope
1428

1529
If you haven't already, install `Oracle SQL Developer Extension for VSCode` using the following [link](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer).
1630

17-
**Note:** The extension supports VSCode >=1.97.0, so make sure your VSCode version is at least 1.97.
31+
**Note:** The extension supports VSCode >=1.101.0, so make sure your VSCode version is at least 1.101.0.
1832

1933
### Install Typescript:
2034

2135
NPM
36+
2237
```sh
2338
npm install --save-dev typescript
2439
```
2540

2641
YARN
42+
2743
```sh
2844
yarn add --dev typescript
2945
```
3046

3147
### Install Type definitions for VSCode
3248

3349
NPM
50+
3451
```sh
3552
npm install --save-dev @types/vscode
3653
```
3754

3855
YARN
56+
3957
```sh
4058
yarn add --dev @types/vscode
4159
```
4260

4361
## Installation
4462

4563
NPM
64+
4665
```sh
4766
npm install --save-dev @oracle/sql-developer-api
4867
```
4968

5069
YARN
70+
5171
```sh
5272
yarn add --dev @oracle/sql-developer-api
5373
```
5474

5575
# Usage
76+
5677
The following code sample illustrates how to retrieve an API instance and use it:
5778

5879
```ts
@@ -65,15 +86,16 @@ if (!extension) {
6586
const api = extension.exports;
6687
```
6788

68-
6989
## Connections
7090

7191
The API exposes a `Connections` interface, allowing access to connections and connection sessions. For instance, the following snippet allows retrieving the first connection in the connections list, connecting to it and executing a script against the session:
92+
7293
```ts
7394
const connections = api.connections().list();
7495
const session = await connections[0].connect();
7596
const resultSet = await session.executeQuery({ sql: 'SELECT * FROM dual;' });
7697
```
98+
7799
The following table lists all available connection and connection session methods:
78100

79101
<table>
@@ -109,25 +131,31 @@ The following table lists all available connection and connection session method
109131
</tr>
110132

111133
<tr>
112-
<td rowspan="2">Connection Session</td>
134+
<td rowspan="3">Connection Session</td>
113135
<td>executeQuery</td>
114136
<td>Executes a DQL query and returns a ResultSet object.</td>
115137
</tr>
116138
<tr>
117139
<td>execute</td>
118140
<td>Executes the given SQL script and returns a result in the specified format.</td>
119141
</tr>
142+
<tr>
143+
<td>prepareSql</td>
144+
<td>Prepares the SQL to execute by analyzing the given sql script and extracts binds and substitutions.</td>
145+
</tr>
120146

121147
</table>
122148

123149
## Worksheets
124150

125151
The API also exposes a `Worksheets` interface, that provides access to SQL worksheets. The following snippets illustrates how this interface can be leveraged to retrieve the content of the active worksheet and executes it against the attached session:
152+
126153
```ts
127154
const activeWorksheet = api.worksheets().activeWorksheet;
128155
const content = activeWorksheet.editor.document.getText();
129156
const resultSet = await activeWorksheet.session.executeQuery({ sql: content });
130157
```
158+
131159
The following table lists all available worksheets methods:
132160

133161
<table>
@@ -172,19 +200,38 @@ The following table lists all available worksheets methods:
172200
<td>Registers a command that can be executed from within a worksheet e.g. from the toolbar.</td>
173201
</tr>
174202

203+
<tr>
204+
<td rowspan="3">Worksheet</td>
205+
<td>editor</td>
206+
<td>The VSCode text editor that's backing the worksheet.</td>
207+
</tr>
208+
<tr>
209+
<td>session</td>
210+
<td>The session associated with the worksheet.</td>
211+
</tr>
212+
<tr>
213+
<td>attach</td>
214+
<td>Allows attaching the worksheet to a connection session.</td>
215+
</tr>
175216

176217
</table>
177218

178219
Consult [the code samples](https://github.com/oracle/sql-developer-vscode/tree/main/samples) for more examples and code snippets on how to use different parts of the API.
179220

180-
<!-- # Changelog: skipped for first release, will be used starting from next release -->
221+
# Changelog
222+
223+
Refer to the [changelog](./CHANGELOG.md) for full release notes and version history.
224+
225+
# Contributing
226+
227+
Please review our [contribution guide](https://github.com/oracle/sql-developer-vscode/blob/main/CONTRIBUTING.md).
181228

182-
## Contributing
229+
# Security
183230

184-
Please review our [contribution guide](https://github.com/oracle/sql-developer-vscode/blob/main/CONTRIBUTING.md)
231+
Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.
185232

186233
# License
187234

188235
Copyright (c) 2025 Oracle and/or its affiliates.
189236

190-
Released under the Universal Permissive License v1.0 as shown at <https://oss.oracle.com/licenses/upl/>.
237+
Released under the Universal Permissive License v1.0 as shown at <https://oss.oracle.com/licenses/upl/>.

extension-api/SECURITY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Reporting security vulnerabilities
2+
3+
Oracle values the independent security research community and believes that
4+
responsible disclosure of security vulnerabilities helps us ensure the security
5+
and privacy of all our users.
6+
7+
Please do NOT raise a GitHub Issue to report a security vulnerability. If you
8+
believe you have found a security vulnerability, please submit a report to
9+
[secalert_us@oracle.com][1] preferably with a proof of concept. Please review
10+
some additional information on [how to report security vulnerabilities to Oracle][2].
11+
We encourage people who contact Oracle Security to use email encryption using
12+
[our encryption key][3].
13+
14+
We ask that you do not use other channels or contact the project maintainers
15+
directly.
16+
17+
Non-vulnerability related security issues including ideas for new or improved
18+
security features are welcome on GitHub Issues.
19+
20+
## Security updates, alerts and bulletins
21+
22+
Security updates will be released on a regular cadence. Many of our projects
23+
will typically release security fixes in conjunction with the
24+
Oracle Critical Patch Update program. Additional
25+
information, including past advisories, is available on our [security alerts][4]
26+
page.
27+
28+
## Security-related information
29+
30+
We will provide security related information such as a threat model, considerations
31+
for secure use, or any known security issues in our documentation. Please note
32+
that labs and sample code are intended to demonstrate a concept and may not be
33+
sufficiently hardened for production use.
34+
35+
[1]: mailto:secalert_us@oracle.com
36+
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
37+
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
38+
[4]: https://www.oracle.com/security-alerts/

0 commit comments

Comments
 (0)