Skip to content

Commit f5607a7

Browse files
committed
Release 23.3
1 parent fecf901 commit f5607a7

File tree

21 files changed

+607
-167
lines changed

21 files changed

+607
-167
lines changed

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
The Oracle Database Multilingual Engine (MLE) enables [JavaScript execution in Oracle Database][1].
33
In this database JavaScript environment, there exist some JavaScript modules that are available out of the box.
44
This repository contains documentation and interface definitions (in the form of TypeScript declarations) for those predefined modules.
5-
While the documentation contains set of human-readable, linked pages, the TypeScript declaration files are typically consumed by an IDE for improving auto-completion.
5+
While the documentation consists of human-readable, linked pages, the TypeScript declaration files are typically consumed by an IDE for improving auto-completion.
66
This is particularly useful in a scenario where JavaScript code gets developed locally in an IDE and then deployed to the database.
77

88
The following JavaScript modules are currently available:
99
- MLE SQL Driver: [mle-js-oracledb][mle-js-oracledb]
1010
- MLE Bindings: [mle-js-bindings][mle-js-bindings]
1111
- MLE PL/SQL Types: [mle-js-plsqltypes][mle-js-plsqltypes]
1212
- MLE Fetch API polyfill: [mle-js-fetch][mle-js-fetch]
13+
- MLE Base64 Encoding: [mle-encode-base64][mle-encode-base64]
1314

1415
## Installation
1516
You need an Oracle Database to make use of the JavaScript modules provided in the Oracle Database Multilingual Engine (MLE).
16-
A very convenient way of getting an Oracle Database instance is to create an always-free Oracle Cloud account and set up a free autonomous database instance there as our [blog article][2] explains in great detail.
17+
A very convenient way of getting an Oracle Database instance is to create an always-free Oracle Cloud account and use it to set up a free autonomous database instance as our [blog article][2] explains in great detail.
1718

19+
### All-In-One Installation (recommended)
1820
You can install all relevant declarations of these modules plus the declarations of all global symbols (`Polyglot`, `console`, `session`, `soda`, `oracledb`, `OracleNumber`, etc.) in one bundle.
1921
You can conveniently install `mle-js` from NPM and then reference it in the beginning of your JavaScript code using the `<reference>` tag:
2022

@@ -23,7 +25,8 @@ npm install mle-js
2325
/// <reference types="mle-js" />
2426
```
2527

26-
If you only need declarations of a particular module, you can also just install them individually:
28+
### Installing Individual Modules
29+
If you only need declarations of a few particular modules, you may also install their declarations individually:
2730

2831
```
2932
npm install mle-js-oracledb
@@ -65,20 +68,25 @@ In order to make the Fetch API available, it needs to be imported first.
6568

6669
[Continue reading...][mle-js-fetch]
6770

71+
### MLE functions to work with base64 encoded data (mle-encode-base64)
72+
This module contains code to work with base64-encoded data.
73+
74+
[Continue reading...][mle-encode-base64]
75+
76+
6877
### Oracle Database
69-
Oracle Database is the world's most popular database.
70-
Available on cloud and on-premises platforms, Oracle Database 19c is the most recent long term release, with an extended support window.
71-
Oracle Database 21c is the latest innovation release, initially available on Oracle cloud through Autonomous Database Free Tier and Database Cloud Service.
78+
Oracle Database is the world’s most popular database. Oracle Database 23c, the next Generation Oracle Database, is now available as a Base Database Service delivering the most complete and simple converged database for developers looking to build new microservice, graph, document and relational applications.
79+
Oracle Database 23c Free is also available for free as a simple download for ease of use.
7280

7381
[Continue reading...][3]
7482

7583
### Version Mapping
7684
The following table shows which version of module documentation and declarations work with which version of Oracle Database:
7785

78-
| Oracle Database | Modules |
79-
| ---------------- | --------|
80-
| 23c | [mle-js@23.2.0][mle-js] <br/> [mle-js-oracledb@23.2.0][mle-js-oracledb] <br/> [mle-js-bindings@23.2.0][mle-js-bindings] <br/> [mle-js-plsqltypes@23.2.0][mle-js-plsqltypes] <br/> [mle-js-fetch@23.2.0][mle-js-fetch] |
81-
| 21c | [mle-js-oracledb@21.3.0][mle-js-oracledb-21c] <br/> [mle-js-bindings@21.3.0][mle-js-bindings-21c] <br/> [mle-js-plsqltypes@21.3.0][mle-js-plsqltypes-21c] |
86+
| Oracle Database | Declarations | Documentation |
87+
| ---------------- | ------------ | ------------- |
88+
| 23c | [mle-js@23.3.0][mle-js-types-233] for Oracle 23.3 <br/> [[email protected]][mle-js-types-232] for Oracle 23.2 - Free | **[mle-js (23c)][mle-js]** <br/> [mle-js-oracledb (23c)][mle-js-oracledb] <br/> [mle-js-bindings (23c)][mle-js-bindings] <br/> [mle-js-plsqltypes (23c)][mle-js-plsqltypes] <br/> [mle-js-fetch (23c)][mle-js-fetch] <br/> [mle-encode-base64 (23c)][mle-encode-base64]|
89+
| 21c | [[email protected].1][mle-js-types-213] | [mle-js-oracledb (21c)][mle-js-oracledb-21c] <br/> [mle-js-bindings (21c)][mle-js-bindings-21c] <br/> [mle-js-plsqltypes (21c)][mle-js-plsqltypes-21c] |
8290

8391
## Examples
8492
The following code snippet exemplifies the usage of some of these MLE modules combined.
@@ -116,18 +124,22 @@ Before submitting a pull request, please [review our contribution guide](./CONTR
116124
Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.
117125

118126
## License
119-
Copyright (c) 2022 Oracle and/or its affiliates.
127+
Copyright (c) 2022, 2023 Oracle and/or its affiliates.
120128

121129
Released under the Universal Permissive License v1.0 as shown at <https://oss.oracle.com/licenses/upl/>.
122130

123-
[mle-js]: http://oracle-samples.github.io/mle-modules/docs/mle-js/23c "[email protected]"
124-
[mle-js-oracledb]: http://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23c "[email protected]"
125-
[mle-js-bindings]: http://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/23c "[email protected]"
126-
[mle-js-plsqltypes]: http://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/23c "[email protected]"
127-
[mle-js-fetch]: http://oracle-samples.github.io/mle-modules/docs/mle-js-fetch/23c "[email protected]"
128-
[mle-js-oracledb-21c]: http://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/21c "[email protected]"
129-
[mle-js-bindings-21c]: http://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/21c "[email protected]"
130-
[mle-js-plsqltypes-21c]: http://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/21c "[email protected]"
131+
[mle-js]: https://oracle-samples.github.io/mle-modules/docs/mle-js/23c "mle-js 23c"
132+
[mle-js-oracledb]: https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23c "mle-js-oracledb 23c"
133+
[mle-js-bindings]: https://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/23c "mle-js-bindings 23c"
134+
[mle-js-plsqltypes]: https://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/23c "mle-js-plsqltypes 23c"
135+
[mle-js-fetch]: https://oracle-samples.github.io/mle-modules/docs/mle-js-fetch/23c "mle-js-fetch 23c"
136+
[mle-encode-base64]: https://oracle-samples.github.io/mle-modules/docs/mle-encode-base64/23c "mle-encode-base64 23c"
137+
[mle-js-oracledb-21c]: https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/21c "mle-js-oracledb 21c"
138+
[mle-js-bindings-21c]: https://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/21c "mle-js-bindings 21c"
139+
[mle-js-plsqltypes-21c]: https://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/21c "mle-js-plsqltypes 21c"
140+
[mle-js-types-233]: https://www.npmjs.com/package/mle-js/v/23.3.0 "[email protected]"
141+
[mle-js-types-232]: https://www.npmjs.com/package/mle-js/v/23.2.0 "[email protected]"
142+
[mle-js-types-213]: https://www.npmjs.com/package/mle-js/v/21.3.1 "[email protected]"
131143
[1]: https://blogs.oracle.com/developers/post/introduction-javascript-oracle-database-23c-free-developer-release "Introduction to JavaScript in Oracle Database 23c Free - Developer Release"
132144
[2]: https://blogs.oracle.com/apex/post/mle-and-the-future-of-server-side-programming-in-oracle-apex "MLE and the Future of Server-Side Programming in Oracle APEX"
133-
[3]: https://docs.oracle.com/en/database/oracle/oracle-database/23/index.html "Oracle Database 23c"
145+
[3]: https://docs.oracle.com/en/database/oracle/oracle-database "Oracle Database"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2023, 2023, Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please consult install instructions and documentation on https://oracle-samples.github.io/mle-modules.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
Copyright (c) 2023, Oracle and/or its affiliates.
3+
4+
The Universal Permissive License (UPL), Version 1.0
5+
6+
Subject to the condition set forth below, permission is hereby granted to any
7+
person obtaining a copy of this software, associated documentation and/or data
8+
(collectively the "Software"), free of charge and under any and all copyright
9+
rights in the Software, and any and all patent rights owned or freely
10+
licensable by each licensor hereunder covering either (i) the unmodified
11+
Software as contributed to or provided by such licensor, or (ii) the Larger
12+
Works (as defined below), to deal in both
13+
14+
(a) the Software, and
15+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16+
one is included with the Software (each a "Larger Work" to which the Software
17+
is contributed by such licensors),
18+
19+
without restriction, including without limitation the rights to copy, create
20+
derivative works of, display, perform, and distribute the Software and make,
21+
use, sell, offer for sale, import, export, have made, and have sold the
22+
Software and the Larger Work(s), and to sublicense the foregoing rights on
23+
either these or other terms.
24+
25+
This license is subject to the following condition:
26+
The above copyright notice and either this complete permission notice or at
27+
a minimum a reference to the UPL must be included in all copies or
28+
substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36+
SOFTWARE.
37+
*/
38+
/**
39+
* Encode a string or a byte buffer into base64.
40+
41+
* The function converts the characters to bytes as if they were ASCII encoded.
42+
* Convert the data to an ArrayBuffer first if you need to convert strings with
43+
* characters outside the ASCII alphabet.
44+
*
45+
* @throws Error if the input string contains a character outside of ASCII
46+
* @return a string with base64-encoded data
47+
*
48+
* @since Oracle 23.3
49+
*/
50+
export declare function encode(input: string | ArrayBuffer | Uint8Array): string;
51+
/**
52+
* Decode a base64 encoded string.
53+
*
54+
* @throws Error if the input contains characters outside base64 alphabet or is otherwise invalid.
55+
* @return a byte array with the decoded data.
56+
*
57+
* @since Oracle 23.3
58+
*/
59+
export declare function decode(input: string): ArrayBuffer;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "mle-encode-base64",
3+
"description": "MLE functions to work with base64 encoded data",
4+
"types": "mle-encode-base64.d.ts",
5+
"author": "Oracle",
6+
"version": "23.3.0",
7+
"license": "UPL-1.0",
8+
"homepage": "https://oracle-samples.github.io/mle-modules",
9+
"repository": {
10+
"type": "git",
11+
"url": "git://github.com/oracle-samples/mle-modules"
12+
},
13+
"bugs": "https://github.com/oracle-samples/mle-modules/issues"
14+
}

declarations/mle-js-bindings/mle-js-bindings.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export declare enum JSTypes {
5656
ORACLE_TIMESTAMP = 10,
5757
/** Type OracleTimeStampTZ */
5858
ORACLE_TIMESTAMP_TZ = 11,
59-
/** Type OracleIntervalYearToDay */
59+
/** Type OracleIntervalYearToMonth */
6060
ORACLE_INTERVAL_YM = 12,
6161
/** Type OracleIntervalDayToSecond */
6262
ORACLE_INTERVAL_DS = 13,

declarations/mle-js-bindings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "mle-js-bindings",
3-
"version": "23.2.0",
43
"description": "MLE Bindings for Oracle Database DBMS_MLE",
54
"types": "mle-js-bindings.d.ts",
65
"author": "Oracle",
6+
"version": "23.3.0",
77
"license": "UPL-1.0",
88
"homepage": "https://oracle-samples.github.io/mle-modules",
99
"repository": {

declarations/mle-js-fetch/body.d.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3535
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3636
SOFTWARE.
3737
*/
38+
import { IBufferWrapper } from './common';
39+
/**
40+
* Type alias for the types the body can be
41+
*
42+
* @since Oracle 23.3
43+
*/
44+
export type BodyType = IBufferWrapper | ArrayBuffer | string | null;
3845
export declare class Body {
3946
#private;
4047
/**
@@ -44,8 +51,8 @@ export declare class Body {
4451
/**
4552
* Retrieve the contents of the body.
4653
*/
47-
get body(): string | null;
48-
constructor(body?: string | Body | null);
54+
get body(): BodyType;
55+
constructor(body?: BodyType | Body);
4956
/**
5057
* Consume the contents of the body as JSON.
5158
*/
@@ -54,17 +61,14 @@ export declare class Body {
5461
* Consume the contents of the body as text.
5562
*/
5663
text(): Promise<string>;
64+
arrayBuffer(): Promise<ArrayBuffer>;
5765
/**
58-
* Unsupported operation.
59-
*/
60-
arrayBuffer(): void;
61-
/**
62-
* Unsupported operation.
66+
* Unsupported operation (keep protected until implemented)
6367
*/
64-
blob(): void;
68+
protected blob(): void;
6569
/**
66-
* Unsupported operation.
70+
* Unsupported operation (keep protected until implemented)
6771
*/
68-
formData(): void;
69-
protected _cloneBodyContent(): string | null;
72+
protected formData(): void;
73+
protected _cloneBodyContent(): BodyType;
7074
}

declarations/mle-js-fetch/common.d.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
Copyright (c) 2022, 2023, Oracle and/or its affiliates.
2+
Copyright (c) 2023, 2023, Oracle and/or its affiliates.
33
44
The Universal Permissive License (UPL), Version 1.0
55
@@ -35,8 +35,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3535
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3636
SOFTWARE.
3737
*/
38-
export declare type InitiatorType = 'audio' | 'beacon' | 'body' | 'css' | 'early-hint' | 'embed' | 'fetch' | 'font' | 'frame' | 'iframe' | 'image' | 'img' | 'input' | 'link' | 'object' | 'ping' | 'script' | 'track' | 'video' | 'xmlhttprequest' | 'other';
39-
export declare type ServiceWorkersMode = 'all' | 'none';
40-
export declare type Initiator = '' | 'download' | 'imageset' | 'manifest' | 'prefetch' | 'prerender' | 'xslt';
41-
export declare type Destination = '' | 'audio' | 'audioworklet' | 'document' | 'embed' | 'font' | 'frame' | 'iframe' | 'image' | 'manifest' | 'object' | 'paintworklet' | 'report' | 'script' | 'serviceworker' | 'sharedworker' | 'style' | 'track' | 'video' | 'worker' | 'xslt';
42-
export declare type ResponseTainting = 'basic' | 'cors' | 'opaque';
38+
/**
39+
* Interface to represent types that provide a view into an ArrayBuffer e.g. DataView
40+
*
41+
* @since Oracle 23.3
42+
*/
43+
export interface IBufferWrapper {
44+
buffer: ArrayBuffer;
45+
}

declarations/mle-js-fetch/headers.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3535
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3636
SOFTWARE.
3737
*/
38-
export declare type HeadersInit = string[][] | Record<string, string> | Headers;
38+
export type HeadersInit = string[][] | Record<string, string> | Headers;
3939
export declare class Headers {
4040
#private;
4141
/**

0 commit comments

Comments
 (0)