Skip to content

Commit

Permalink
Release 23.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbraun committed Aug 30, 2024
1 parent ec25619 commit a4ea510
Show file tree
Hide file tree
Showing 107 changed files with 557 additions and 181 deletions.
76 changes: 58 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The following JavaScript modules are currently available:
- MLE PL/SQL Types: [mle-js-plsqltypes][mle-js-plsqltypes]
- MLE Fetch API polyfill: [mle-js-fetch][mle-js-fetch]
- MLE Base64 Encoding: [mle-encode-base64][mle-encode-base64]
- MLE Encodings: [mle-js-encodings][mle-js-encodings]

## Installation
You need an Oracle Database to make use of the JavaScript modules provided in the Oracle Database Multilingual Engine (MLE).
Expand All @@ -33,6 +34,8 @@ npm install mle-js-oracledb
npm install mle-js-bindings
npm install mle-js-plsqltypes
npm install mle-js-fetch
npm install mle-encode-base64
npm install mle-js-encodings
```

## Documentation
Expand Down Expand Up @@ -91,33 +94,68 @@ The following table shows which version of module documentation and declarations

| Oracle Database | Declarations | Documentation |
| ---------------- | ------------ | ------------- |
| 23ai | [mle-js@23.4.0][mle-js-types-234] for Oracle 23.4 <br/> [mle-js@23.3.0][mle-js-types-233] for Oracle 23.3 <br/> [mle-js@23.2.0][mle-js-types-232] for Oracle 23.2 - Free | **[mle-js (23ai)][mle-js]** <br/> [mle-js-oracledb (23ai)][mle-js-oracledb] <br/> [mle-js-bindings (23ai)][mle-js-bindings] <br/> [mle-js-plsqltypes (23ai)][mle-js-plsqltypes] <br/> [mle-js-fetch (23ai)][mle-js-fetch] <br/> [mle-encode-base64 (23ai)][mle-encode-base64]|
| 23ai | [mle-js@23.5.0][mle-js-types-235] for Oracle 23.5 <br/> [mle-js@23.4.0][mle-js-types-234] for Oracle 23.4 <br/> [mle-js@23.3.0][mle-js-types-233] for Oracle 23.3 <br/> [mle-js@23.2.0][mle-js-types-232] for Oracle 23.2 - Free | **[mle-js (23ai)][mle-js]** <br/> [mle-js-oracledb (23ai)][mle-js-oracledb] <br/> [mle-js-bindings (23ai)][mle-js-bindings] <br/> [mle-js-plsqltypes (23ai)][mle-js-plsqltypes] <br/> [mle-js-fetch (23ai)][mle-js-fetch] <br/> [mle-encode-base64 (23ai)][mle-encode-base64]|
| 21c | [mle-js@21.3.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] |

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

```JavaScript
// imports
const oracledb = require('mle-js-oracledb');
const bindings = require('mle-js-bindings');
const plsqltypes = require("mle-js-plsqltypes");

// Read a large number as an Oracle NUMBER from SQL and add another ORACLE NUMBER to it.
// mle-js-oracledb is used for reading from SQL and mle-js-plsqltypes is used to construct the second Oracle NUMBER.
const conn = oracledb.defaultConnection();
const query = "SELECT 9007199254740992 AS n FROM dual";
const options = { fetchInfo: { N: { type: oracledb.ORACLE_NUMBER } } };
const queryResult = conn.execute(query, [], options);
const OracleNumber = plsqltypes.OracleNumber;
const result = queryResult.rows[0][0].add(new OracleNumber(7));

// Use mle-js-bindings to export the result of the computation.
// On the database side, this result could be retrieved using something like `dbms_mle.import_from_mle(ctx, 'result', result);`.
bindings.exportValue("result", result);
async function run() {
// import modules that do not have global symbols
const bindings = await import('mle-js-bindings');

// Read a large number as an Oracle NUMBER from SQL and add another ORACLE NUMBER to it.
// mle-js-oracledb (session) is used for reading from SQL and mle-js-plsqltypes (OracleNumber) is used to construct the second Oracle NUMBER.
const query = "SELECT 9007199254740992 AS n FROM dual";
const options = { fetchInfo: { N: { type: oracledb.ORACLE_NUMBER } } };
const queryResult = session.execute(query, [], options);
const result = queryResult.rows[0].N.add(new OracleNumber(7));

// print result to the console before exporting it
console.log(result);

// Use mle-js-bindings to export the result of the computation.
// On the database side, this result could be retrieved using something like `dbms_mle.import_from_mle(ctx, 'result', result);`.
bindings.exportValue("result", result);
}
run();
```

## Building and deploying larger JavaScript projects
If you plan to use database-side JavaScript at a larger scale, we highly
recommend to read our blog post on [Linting MLE JavaScript Modules in Continuous
Integration Pipelines][4].

## Changelog
- **Oracle 23.5**
- support for
(sql-template-tag)[https://www.npmjs.com/package/sql-template-tag#oracledb]
in SQL execution in `mle-js-oracledb` / `session.execute` by allowing the
first argument to be of new type
[IExecuteArgs](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/interfaces/api.IExecuteArgs.html)
- **Oracle 23.4 (first release of Oracle 23ai)**
- support for VECTOR type (INT8ARRAY, FLOAT32ARRAY, FLOAT64, DB_TYPE_VECTOR) in
[mle-js-oracledb](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/modules/api.html)
and
[mle-js-bindings](https://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/23ai/enums/JSTypes.html)
including new
[vectorDimensions](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/interfaces/api.IMetaData.html#vectorDimensions)
and
[vectorFormat](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/interfaces/api.IMetaData.html#vectorFormat)
meta data properties
- support for binding collection types, including new properties
[elementTypeClass](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/classes/api.IDbObjectClass.html#elementTypeClass)
and
[packageName](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/classes/api.IDbObjectClass.html#packageName)
of `DBObjectClass` and
[maxArraySize](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/interfaces/api.IBindObjectValue.html#maxArraySize)
of bind definitions in `mle-js-oracledb`.
- support for
[keepInStmtCache](https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/23ai/interfaces/api.IExecuteOptions.html#keepInStmtCache)
option in SQL execution in `mle-js-oracledb` / `session.execute`

## Help
If you have questions or change requests about MLE, please [create a ticket](./CONTRIBUTING.md) or contact [Oracle Support](https://support.oracle.com).

Expand All @@ -144,10 +182,12 @@ Released under the Universal Permissive License v1.0 as shown at <https://oss.or
[mle-js-oracledb-21c]: https://oracle-samples.github.io/mle-modules/docs/mle-js-oracledb/21c "mle-js-oracledb 21c"
[mle-js-bindings-21c]: https://oracle-samples.github.io/mle-modules/docs/mle-js-bindings/21c "mle-js-bindings 21c"
[mle-js-plsqltypes-21c]: https://oracle-samples.github.io/mle-modules/docs/mle-js-plsqltypes/21c "mle-js-plsqltypes 21c"
[mle-js-types-235]: https://www.npmjs.com/package/mle-js/v/23.5.0 "mle-js@23.5.0"
[mle-js-types-234]: https://www.npmjs.com/package/mle-js/v/23.4.0 "mle-js@23.4.0"
[mle-js-types-233]: https://www.npmjs.com/package/mle-js/v/23.3.0 "mle-js@23.3.0"
[mle-js-types-232]: https://www.npmjs.com/package/mle-js/v/23.2.0 "mle-js@23.2.0"
[mle-js-types-213]: https://www.npmjs.com/package/mle-js/v/21.3.1 "mle-js@21.3.1"
[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"
[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"
[3]: https://docs.oracle.com/en/database/oracle/oracle-database "Oracle Database"
[4]: https://blogs.oracle.com/developers/post/linting-mle-javascript-modules-in-continuous-integration-pipelines "JavaScript CI/CD blog"
2 changes: 1 addition & 1 deletion THIRD_PARTY_LICENSES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Third Party Attributions for Code

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TypeDoc 0.23.19 TypeDoc Contributors
TypeDoc 0.23.28 TypeDoc Contributors
(https://github.com/TypeStrong/typedoc/graphs/contributors)
Apache 2.0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Expand Down
48 changes: 10 additions & 38 deletions docs/mle-encode-base64/23ai/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,18 @@
--dark-hl-0: #569CD6;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
--light-hl-2: #0070C1;
--dark-hl-2: #4FC1FF;
--light-hl-3: #AF00DB;
--dark-hl-3: #C586C0;
--light-hl-4: #A31515;
--dark-hl-4: #CE9178;
--light-hl-5: #001080;
--dark-hl-5: #9CDCFE;
--light-hl-2: #001080;
--dark-hl-2: #9CDCFE;
--light-hl-3: #0070C1;
--dark-hl-3: #4FC1FF;
--light-hl-4: #AF00DB;
--dark-hl-4: #C586C0;
--light-hl-5: #A31515;
--dark-hl-5: #CE9178;
--light-hl-6: #795E26;
--dark-hl-6: #DCDCAA;
--light-hl-7: #098658;
--dark-hl-7: #B5CEA8;
--light-hl-8: #000000;
--dark-hl-8: #C8C8C8;
--light-hl-9: #008000;
--dark-hl-9: #6A9955;
--light-hl-10: #267F99;
--dark-hl-10: #4EC9B0;
--light-hl-11: #CD3131;
--dark-hl-11: #F44747;
--light-hl-7: #267F99;
--dark-hl-7: #4EC9B0;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -36,10 +28,6 @@
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--code-background: var(--light-code-background);
} }

Expand All @@ -52,10 +40,6 @@
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--code-background: var(--dark-code-background);
} }

Expand All @@ -68,10 +52,6 @@
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--code-background: var(--light-code-background);
}

Expand All @@ -84,10 +64,6 @@
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--code-background: var(--dark-code-background);
}

Expand All @@ -99,8 +75,4 @@
.hl-5 { color: var(--hl-5); }
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
.hl-10 { color: var(--hl-10); }
.hl-11 { color: var(--hl-11); }
pre, code { background: var(--code-background); }
Loading

0 comments on commit a4ea510

Please sign in to comment.