You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-19Lines changed: 38 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,37 +1,44 @@
1
1
# 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].
3
3
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.
5
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.
6
6
This is particularly useful in a scenario where JavaScript code gets developed locally in an IDE and then deployed to the database.
7
7
8
8
The following JavaScript modules are currently available:
- MLE Fetch API polyfill: [mle-js-fetch][mle-js-fetch]
12
13
13
14
## Installation
14
15
You need an Oracle Database to make use of the JavaScript modules provided in the Oracle Database Multilingual Engine (MLE).
15
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.
16
17
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:
18
20
19
21
```
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" />
23
24
```
24
25
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
+
28
28
```
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
31
33
```
32
34
33
35
## Documentation
34
36
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
+
35
42
### MLE SQL Driver (mle-js-oracledb)
36
43
If JavaScript is executed inside the database, SQL statements can be executed using an easy to use SQL driver.
37
44
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
52
59
53
60
[Continue reading...][mle-js-plsqltypes]
54
61
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
+
55
68
### Oracle Database
56
69
Oracle Database is the world's most popular database.
57
70
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
[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"
113
132
[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"
0 commit comments