Skip to content

Commit 0c222f4

Browse files
committed
Release 21.3
1 parent 338e9ee commit 0c222f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+525
-9740
lines changed

CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Contributing to this repository
2+
3+
We welcome your contributions! There are multiple ways to contribute.
4+
5+
## Opening issues
6+
7+
For bugs or enhancement requests, please file a GitHub issue unless it's
8+
security related. When filing a bug remember that the better written the bug is,
9+
the more likely it is to be fixed. If you think you've found a security
10+
vulnerability, do not raise a GitHub issue and follow the instructions in our
11+
[security policy](./SECURITY.md).
12+
13+
## Contributing code
14+
15+
We welcome your code contributions. Before submitting code via a pull request,
16+
you will need to have signed the [Oracle Contributor Agreement][OCA] (OCA) and
17+
your commits need to include the following line using the name and e-mail
18+
address you used to sign the OCA:
19+
20+
```text
21+
Signed-off-by: Your Name <[email protected]>
22+
```
23+
24+
This can be automatically added to pull requests by committing with `--sign-off`
25+
or `-s`, e.g.
26+
27+
```text
28+
git commit --signoff
29+
```
30+
31+
Only pull requests from committers that can be verified as having signed the OCA
32+
can be accepted.
33+
34+
## Pull request process
35+
36+
1. Ensure there is an issue created to track and discuss the fix or enhancement
37+
you intend to submit.
38+
1. Fork this repository
39+
1. Create a branch in your fork to implement the changes. We recommend using
40+
the issue number as part of your branch name, e.g. `1234-fixes`
41+
1. Ensure that any documentation is updated with the changes that are required
42+
by your change.
43+
1. Ensure that any samples are updated if the base image has been changed.
44+
1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly
45+
what your changes are meant to do and provide simple steps on how to validate
46+
your changes. Ensure that you reference the issue you created as well.
47+
1. We will assign the pull request to 2-3 people for review before it is merged.
48+
49+
## Code of conduct
50+
51+
Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd
52+
like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC].
53+
54+
[OCA]: https://oca.opensource.oracle.com
55+
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
56+

LICENSE renamed to LICENSE.txt

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

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

README.md

Lines changed: 101 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,106 @@
11
# MLE Modules
2-
This repository contains documentation and interface definitions for MLE modules as provided in Oracle Database.
2+
The Oracle Database Multilingual Engine (MLE) enables [JavaScript execution in Oracle Database as of version 21c][1].
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.
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+
This is particularly useful in a scenario where JavaScript code gets developed locally in an IDE and then deployed to the database.
37

4-
## Oracle Database 21c
8+
The following JavaScript modules are currently available:
9+
- MLE SQL Driver: [mle-js-oracledb][mle-js-oracledb]
10+
- MLE Bindings: [mle-js-bindings][mle-js-bindings]
11+
- MLE PL/SQL Types [mle-js-plsqltypes][mle-js-plsqltypes]
512

6-
### Interface Definitions
7-
- MLE SQL Driver: [./mle-js-oracledb](./mle-js-oracledb)
8-
- MLE Bindings: [./mle-js-bindings](./mle-js-bindings)
9-
- MLE PL/SQL Types [./mle-js-plsqltypes](./mle-js-plsqltypes)
13+
## Installation
14+
You need an Oracle Database to make use of the JavaScript modules provided in the Oracle Database Multilingual Engine (MLE).
15+
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.
1016

11-
### Documentation
12-
- MLE SQL Driver: [./docs/mle-js-oracledb/21.3.0](./docs/mle-js-oracledb/21.3.0)
13-
- MLE Bindings: [./docs/mle-js-bindings/21.3.0](./docs/mle-js-bindings/21.3.0)
14-
- MLE PL/SQL Types [./docs/mle-js-plsqltypes/21.3.0](./docs/mle-js-plsqltypes/21.3.0)
17+
The declaration files can conveniently be installed into your project directory using NPM:
1518

19+
```
20+
npm install mle-js-oracledb
21+
npm install mle-js-bindings
22+
npm install mle-js-plsqltypes
23+
```
24+
25+
## Documentation
26+
27+
### MLE SQL Driver (mle-js-oracledb)
28+
If JavaScript is executed inside the database, SQL statements can be executed using an easy to use SQL driver.
29+
This driver is built-in into the JavaScript engine in the database.
30+
31+
[Continue reading...][mle-js-oracledb]
32+
33+
### MLE Bindings for Oracle Database `DBMS_MLE` (mle-js-bindings)
34+
The MLE Bindings module can be used to exchange values between PL/SQL and JavaScript.
35+
The module also takes care of converting values from PL/SQL types to JavaScript types and vice-versa automatically as required.
36+
37+
[Continue reading...][mle-js-bindings]
38+
39+
### MLE PL/SQL Types (mle-js-plsqltypes)
40+
MLE allows importing SQL values from PL/SQL as well as fetching them from a SQL statement.
41+
By default, SQL values get converted to JavaScript values during that process, e.g. an Oracle `NUMBER` gets converted to a JavaScript `number`.
42+
Sometimes it is required to have JavaScript values that behave exactly as if they were SQL values.
43+
The mle-js-plsqltypes module contains JavaScript APIs for such JavaScript objects that wrap PL/SQL objects.
44+
45+
[Continue reading...][mle-js-plsqltypes]
46+
47+
### Oracle Database
48+
Oracle Database is the world's most popular database.
49+
Available on cloud and on-premises platforms, Oracle Database 19c is the most recent long term release, with an extended support window.
50+
Oracle Database 21c is the latest innovation release, initially available on Oracle cloud through Autonomous Database Free Tier and Database Cloud Service.
51+
52+
[Continue reading...][3]
53+
54+
### Version Mapping
55+
The following table shows which version of module documentation and declarations work with which version of Oracle Database:
56+
57+
| Oracle Database | Modules |
58+
| ---------------- | --------|
59+
| 21.3, 21.4, etc. | [[email protected]][mle-js-oracledb] <br/> [[email protected]][mle-js-bindings] <br/> [[email protected]][mle-js-plsqltypes] |
60+
61+
## Examples
62+
The following code snippet exemplifies the usage of all MLE modules combined.
63+
For additional examples, please check the module documentation pages or have a look at our [blog article][2].
64+
65+
```JavaScript
66+
// imports
67+
const oracledb = require('mle-js-oracledb');
68+
const bindings = require('mle-js-bindings');
69+
const plsqltypes = require("mle-js-plsqltypes");
70+
71+
// Read a large number as an Oracle NUMBER from SQL and add another ORACLE NUMBER to it.
72+
// mle-js-oracledb is used for reading from SQL and mle-js-plsqltypes is used to construct the second Oracle NUMBER.
73+
const conn = oracledb.defaultConnection();
74+
const query = "SELECT 9007199254740992 AS n FROM dual";
75+
const options = { fetchInfo: { N: { type: oracledb.ORACLE_NUMBER } } };
76+
const queryResult = conn.execute(query, [], options);
77+
const OracleNumber = plsqltypes.OracleNumber;
78+
const result = queryResult.rows[0][0].add(new OracleNumber(7));
79+
80+
// Use mle-js-bindings to export the result of the computation.
81+
// On the database side, this result could be retrieved using something like `dbms_mle.import_from_mle(ctx, 'result', result);`.
82+
bindings.exportValue("result", result);
83+
```
84+
85+
## Help
86+
If you have questions or change requests about MLE, please [create a ticket](./CONTRIBUTING.md) or contact [Oracle Support](https://support.oracle.com).
87+
88+
## Contributing
89+
This project welcomes contributions from the community.
90+
Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md).
91+
92+
## Security
93+
94+
Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.
95+
96+
## License
97+
Copyright (c) 2022 Oracle and/or its affiliates.
98+
99+
Released under the Universal Permissive License v1.0 as shown at <https://oss.oracle.com/licenses/upl/>.
100+
101+
[mle-js-oracledb]: http://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/21c "[email protected]"
102+
[mle-js-bindings]: http://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/21c "[email protected]"
103+
[mle-js-plsqltypes]: http://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/21c "[email protected]"
104+
[1]: https://medium.com/graalvm/mle-executing-javascript-in-oracle-database-c545feb1a010 "Multilingual Engine: Executing JavaScript in Oracle Database"
105+
[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"
106+
[3]: https://docs.oracle.com/en/database/oracle/oracle-database/21/index.html "Oracle Database 21c"

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+
[[email protected]][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][3] 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:[email protected]
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/

mle-js-bindings/THIRD_PARTY_LICENSES_DEV.txt renamed to THIRD_PARTY_LICENSES.txt

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
Third Party Attributions for Development Code
2-
3-
This file contains dependencies that are used in build scripts, sample code,
4-
and test suites. These should NOT be needed at runtime by an application built
5-
using this code.
1+
Third Party Attributions for Code
62

73
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
8-
TypeScript 4.4.3 Microsoft Corp.
4+
TypeDoc 0.23.19 TypeDoc Contributors
5+
(https://github.com/TypeStrong/typedoc/graphs/contributors)
96
Apache 2.0
107
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
118

129
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
13-
TypeDoc 0.22.4 TypeDoc Contributors
14-
(https://github.com/TypeStrong/typedoc/graphs/contributors)
15-
Apache 2.0
10+
Lunr.js 2.3.9 Oliver Nightingale
11+
(https://github.com/olivernn/lunr.js)
12+
MIT
1613
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1714

1815
Apache License
@@ -176,3 +173,27 @@ incurred by, or claims asserted against, such Contributor by reason of your
176173
accepting any such warranty or additional liability.
177174

178175
END OF TERMS AND CONDITIONS
176+
177+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
178+
179+
MIT License
180+
181+
Copyright (C) 2013 by Oliver Nightingale
182+
183+
Permission is hereby granted, free of charge, to any person obtaining a copy
184+
of this software and associated documentation files (the "Software"), to deal
185+
in the Software without restriction, including without limitation the rights
186+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
187+
copies of the Software, and to permit persons to whom the Software is
188+
furnished to do so, subject to the following conditions:
189+
190+
The above copyright notice and this permission notice shall be included in
191+
all copies or substantial portions of the Software.
192+
193+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
194+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
195+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
196+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
197+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
198+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
199+
THE SOFTWARE.

0 commit comments

Comments
 (0)