Skip to content

Commit 68634f1

Browse files
committed
Release 23.2
1 parent 89737ca commit 68634f1

27 files changed

+2300
-247
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017, 2022, Oracle and/or its affiliates.
1+
Copyright (c) 2017, 2023, Oracle and/or its affiliates.
22

33
The Universal Permissive License (UPL), Version 1.0
44

README.md

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
# MLE Modules
2-
The Oracle Database Multilingual Engine (MLE) enables [JavaScript execution in Oracle Database as of version 21c][1].
2+
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.
4-
This repository contains documentation and interface definitions (in the form of TypeScript declarations) for those pre-defined modules.
4+
This repository contains documentation and interface definitions (in the form of TypeScript declarations) for those predefined modules.
55
While the documentation contains set 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]
11-
- MLE PL/SQL Types [mle-js-plsqltypes][mle-js-plsqltypes]
11+
- MLE PL/SQL Types: [mle-js-plsqltypes][mle-js-plsqltypes]
12+
- MLE Fetch API polyfill: [mle-js-fetch][mle-js-fetch]
1213

1314
## Installation
1415
You need an Oracle Database to make use of the JavaScript modules provided in the Oracle Database Multilingual Engine (MLE).
1516
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.
1617

17-
The declaration files can conveniently be installed into your project directory using NPM:
18+
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.
19+
You can conveniently install `mle-js` from NPM and then reference it in the beginning of your JavaScript code using the `<reference>` tag:
1820

1921
```
20-
npm install mle-js-oracledb
21-
npm install mle-js-bindings
22-
npm install mle-js-plsqltypes
22+
npm install mle-js
23+
/// <reference types="mle-js" />
2324
```
2425

25-
Alternatively, you can also download `mle-js` which is a single bundled ambient file for all these module declarations in one.
26-
In addition, this bundle also contains declarations for GraalVM JavaScript builtins, concretely `Polyglot` and `console`.
27-
You can conveniently install it from NPM and then reference it in the beginning of your JavaScript code using the `<reference>` tag:
26+
If you only need declarations of a particular module, you can also just install them individually:
27+
2828
```
29-
npm install mle-js
30-
/// <reference types="mle-js" />
29+
npm install mle-js-oracledb
30+
npm install mle-js-bindings
31+
npm install mle-js-plsqltypes
32+
npm install mle-js-fetch
3133
```
3234

3335
## Documentation
3436

37+
### All-In-One bundle for MLE modules (mle-js)
38+
This bundle contains all relevant declarations of predefined JavaScript modules that ship with the database plus the declarations of all global symbols.
39+
40+
[Continue reading...][mle-js]
41+
3542
### MLE SQL Driver (mle-js-oracledb)
3643
If JavaScript is executed inside the database, SQL statements can be executed using an easy to use SQL driver.
3744
This driver is built-in into the JavaScript engine in the database.
@@ -52,6 +59,12 @@ The mle-js-plsqltypes module contains JavaScript APIs for such JavaScript object
5259

5360
[Continue reading...][mle-js-plsqltypes]
5461

62+
### MLE Fetch API polyfill (mle-js-fetch)
63+
MLE offers the following functionality to fetch and upload resources asynchronously across the network: fetch, Headers, Request, Response.
64+
In order to make the Fetch API available, it needs to be imported first.
65+
66+
[Continue reading...][mle-js-fetch]
67+
5568
### Oracle Database
5669
Oracle Database is the world's most popular database.
5770
Available on cloud and on-premises platforms, Oracle Database 19c is the most recent long term release, with an extended support window.
@@ -64,10 +77,11 @@ The following table shows which version of module documentation and declarations
6477

6578
| Oracle Database | Modules |
6679
| ---------------- | --------|
67-
| 21.3, 21.4, etc. | [[email protected]][mle-js-oracledb] <br/> [[email protected]][mle-js-bindings] <br/> [[email protected]][mle-js-plsqltypes] |
80+
| 23c | [[email protected]][mle-js] <br/> [[email protected]][mle-js-oracledb] <br/> [[email protected]][mle-js-bindings] <br/> [[email protected]][mle-js-plsqltypes] <br/> [[email protected]][mle-js-fetch] |
81+
| 21c | [[email protected]][mle-js-oracledb-21c] <br/> [[email protected]][mle-js-bindings-21c] <br/> [[email protected]][mle-js-plsqltypes-21c] |
6882

6983
## Examples
70-
The following code snippet exemplifies the usage of all MLE modules combined.
84+
The following code snippet exemplifies the usage of some of these MLE modules combined.
7185
For additional examples, please check the module documentation pages or have a look at our [blog article][2].
7286

7387
```JavaScript
@@ -106,9 +120,14 @@ Copyright (c) 2022 Oracle and/or its affiliates.
106120

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

109-
[mle-js-oracledb]: http://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/21c "[email protected]"
110-
[mle-js-bindings]: http://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/21c "[email protected]"
111-
[mle-js-plsqltypes]: http://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/21c "[email protected]"
112-
[1]: https://medium.com/graalvm/mle-executing-javascript-in-oracle-database-c545feb1a010 "Multilingual Engine: Executing JavaScript in Oracle Database"
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+
[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"
113132
[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"
114-
[3]: https://docs.oracle.com/en/database/oracle/oracle-database/21/index.html "Oracle Database 21c"
133+
[3]: https://docs.oracle.com/en/database/oracle/oracle-database/23/index.html "Oracle Database 23c"

declarations/mle-js-bindings/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017, 2022, Oracle and/or its affiliates.
1+
Copyright (c) 2017, 2023, Oracle and/or its affiliates.
22

33
The Universal Permissive License (UPL), Version 1.0
44

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
Copyright (c) 2019, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2019, 2022, Oracle and/or its affiliates.
33
44
The Universal Permissive License (UPL), Version 1.0
55
@@ -44,10 +44,6 @@ export declare enum JSTypes {
4444
DATE = 2,
4545
/** Type Boolean */
4646
BOOLEAN = 3,
47-
/** Type CLOB */
48-
CLOB = 4,
49-
/** Type BLOB */
50-
BLOB = 5,
5147
/** Type Object */
5248
OBJECT = 6,
5349
/** UINT8ARRAY */
@@ -67,7 +63,9 @@ export declare enum JSTypes {
6763
/** Type OracleCLOB */
6864
ORACLE_CLOB = 14,
6965
/** Type OracleBLOB */
70-
ORACLE_BLOB = 15
66+
ORACLE_BLOB = 15,
67+
/** Type DbTypeJson */
68+
DB_TYPE_JSON = 16
7169
}
7270
/**
7371
* Import a value exported from PL/SQL into the current context

declarations/mle-js-bindings/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mle-js-bindings",
3-
"version": "21.3.0",
3+
"version": "23.2.0",
44
"description": "MLE Bindings for Oracle Database DBMS_MLE",
55
"types": "mle-js-bindings.d.ts",
66
"author": "Oracle",
@@ -11,4 +11,4 @@
1111
"url": "git://github.com/oracle-samples/mle-modules"
1212
},
1313
"bugs": "https://github.com/oracle-samples/mle-modules/issues"
14-
}
14+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Copyright (c) 2022, 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.
36+
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: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/**
2+
Copyright (c) 2022, 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+
export declare class Body {
39+
#private;
40+
/**
41+
* Check if the contents of the body have been consumed.
42+
*/
43+
get bodyUsed(): boolean;
44+
/**
45+
* Retrieve the contents of the body.
46+
*/
47+
get body(): string | null;
48+
constructor(body?: string | Body | null);
49+
/**
50+
* Consume the contents of the body as JSON.
51+
*/
52+
json(): Promise<any>;
53+
/**
54+
* Consume the contents of the body as text.
55+
*/
56+
text(): Promise<string>;
57+
/**
58+
* Unsupported operation.
59+
*/
60+
arrayBuffer(): void;
61+
/**
62+
* Unsupported operation.
63+
*/
64+
blob(): void;
65+
/**
66+
* Unsupported operation.
67+
*/
68+
formData(): void;
69+
protected _cloneBodyContent(): string | null;
70+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
Copyright (c) 2022, 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+
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';
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
Copyright (c) 2022, 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+
import { RequestInit, RequestInfo } from './request';
39+
import { Response } from './response';
40+
/**
41+
* Make a request to the specified resource.
42+
*
43+
* @param input a path to the resource or a {@link Request} object that configures the retrieval
44+
* @param init additional configuration for the retrieval
45+
* @returns a {@link Response} that contains the result of resource retrieval
46+
*/
47+
export declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;

0 commit comments

Comments
 (0)