Oracle DBMS_MLE Version 21c |
---|
General Information | |||||||
Library Note |
|
||||||
Purpose | This Multi-Lingual Engine (MLE) package allows users to execute JavaScript code inside the Oracle Database and exchange data seamlessly between PL/SQL and JavaScript.
The JavaScript code itself can execute PL/SQL and SQL through built-in JavaScript modules. JavaScript data types are automatically mapped to Oracle Database data types and vice versa. With the DBMS_MLE package, developers can write their data processing logic in JavaScript. The runtime state for MLE execution is encapsulated in execution contexts that users can explicitly create and destroy. Users can also export values from PL/SQL to MLE, and import values from MLE back into PL/SQL. |
||||||
AUTHID | CURRENT_USER | ||||||
Data Types | SUBTYPE context_handle_t IS RAW(16); /* type for context handle */ |
||||||
Dependencies |
|
||||||
Documented | Yes | ||||||
Exceptions |
|
||||||
First Available | 20c | ||||||
Security Model | Owned by SYS with EXECUTE granted to PUBLIC EXECUTE DYNAMIC MLE system privilege required for some functionality |
||||||
Source | {ORACLE_HOME}/rdbms/admin/ | ||||||
Subprograms |
|
||||||
CREATE_CONTEXT (new 21c) ![]() |
|||||||
Creates an MLE context for executing snippets in any MLE language | dbms_mle.create_context RETURN context_handle_t; |
||||||
See Demo At Page Bottom |
|||||||
DISABLE_CTX_STDERR (new 21c) ![]() |
|||||||
Disables stderr stream of the specified MLE context, so that future writes to stderr are discarded | dbms_mle.disable_ctx_stderr(context_handle IN context_handle_t); |
||||||
DECLARE |
|||||||
DISABLE_CTX_STDOUT (new 21c) ![]() |
|||||||
Disables stdout stream of the specified MLE context, so that future writes to stdout are discarded | dbms_mle.disable_ctx_stdout(context_handle IN context_handle_t); |
||||||
See DISABLE_CTX_STDERR Demo Above |
|||||||
DISABLE_STDERR (new 21c) ![]() |
|||||||
Disables the stderr stream of all MLE contexts, so that future writes to stderr are discarded | dbms_mle.disable_stderr; |
||||||
See DISABLE_CTX_STDERR Demo Above |
|||||||
DISABLE_STDOUT (new 21c) ![]() |
|||||||
Disables the stdout stream of all MLE contexts, so that future writes to stdout are discarded | dbms_mle.disable_stdout;; |
||||||
See DISABLE_CTX_STDERR Demo Above |
|||||||
DROP_CONTEXT (new 21c) ![]() |
|||||||
Drop an MLE context created using CREATE_CONTEXT | dbms_mle.drop_context(context_handle IN context_handle_t); |
||||||
See Demo At Page Bottom |
|||||||
EVAL (new 21c) ![]() |
|||||||
Executes the given MLE language code within the context identified by the context handle Overload 1 |
dbms_mle.eval( |
||||||
See Demo At Page Bottom |
|||||||
Overload 2 | dbms_mle.eval( |
||||||
TBD | |||||||
Overload 3 | dbms_mle.eval( |
||||||
TBD | |||||||
Overload 4 | dbms_mle.eval( |
||||||
TBD | |||||||
EXPORT_CHAR (new 21c) ![]() |
|||||||
Assigns the given value, with appropriate conversion, to the named property in the MLE context. The property is created if it is not already present. |
dbms_mle.export_char( |
||||||
TBD | |||||||
EXPORT_RAW (new 21c) ![]() |
|||||||
Assigns the given value, with appropriate conversion, to the named property in the MLE context. The property is created if it is not already present. |
dbms_mle.export_raw( |
||||||
TBD | |||||||
EXPORT_TO_MLE (new 21c) ![]() |
|||||||
Assigns the given value, with appropriate conversion, to the named property in the MLE context. The property is created if it is not already present. Overload 1 |
dbms_mle.export_to_mle( |
||||||
See Demo At Page Bottom |
|||||||
Overload 2 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 3 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 4 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 5 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 6 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 7 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 8 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 9 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 10 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 11 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 12 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
Overload 13 | dbms_mle.export_to_mle( |
||||||
TBD | |||||||
EXPORT_UROWID (new 21c) ![]() |
|||||||
Assigns the given value, with appropriate conversion, to the named property in the MLE context. The property is created if it is not already present. |
dbms_mle.export_urowid( |
||||||
TBD | |||||||
GET_AVAILABLE_LANGUAGES (new 21c) ![]() |
|||||||
Returns the set of available
languages As of the initial release of 21c the only language is JAVASCRIPT |
dbms_mle.get_available_languages RETURN languages_t; |
||||||
DECLARE |
|||||||
GET_CTX_ERROR_STACK (new 21c) ![]() |
|||||||
Returns the MLE language stack trace for the most recent application error in the given execution context | dbms_mle.get_ctx_error_stack(context_handle IN context_handle_t) |
||||||
TBD | |||||||
IMPORT_CHAR (new 21c) ![]() |
|||||||
Retrieves the value of the named property from the MLE context and converts it to the requested PL/SQL type | dbms_mle.import_char( |
||||||
TBD | |||||||
IMPORT_FROM_MLE (new 21c) ![]() |
|||||||
Retrieves the value of the named property from the MLE context and converts it to the requested PL/SQL type Overload 1 |
dbms_mle.import_from_mle( |
||||||
See Demo At Page Bottom |
|||||||
Overload 2 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 3 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 4 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 5 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 6 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 7 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 8 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 9 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 10 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 11 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 12 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
Overload 13 | dbms_mle.import_from_mle( |
||||||
TBD | |||||||
IMPORT_RAW (new 21c) ![]() |
|||||||
Retrieves the value of the named property from the MLE context and converts it to the requested PL/SQL type | dbms_mle.import_raw( |
||||||
TBD | |||||||
IMPORT_UROWID (new 21c) ![]() |
|||||||
Retrieves the value of the named property from the MLE context and converts it to the requested PL/SQL type | dbms_mle.import_urowid( |
||||||
TBD | |||||||
SET_CTX_STDERR (new 21c) ![]() |
|||||||
Redirect the stderr stream of the MLE context to the given CLOB | dbms_mle.set_ctx_stderr( |
||||||
TBD | |||||||
SET_CTX_STDERR_TO_DBMS_OUTPUT (new 21c) ![]() |
|||||||
Redirect the stderr stream of the MLE context to DBMS_OUTPUT | dbms_mle.set_ctx_stderr_to_dbms_output(context_handle IN context_handle_t); |
||||||
TBD | |||||||
SET_CTX_STDOUT (new 21c) ![]() |
|||||||
Redirect the stdout stream of the MLE context to the given CLOB | dbms_mle.set_ctx_stdout( |
||||||
TBD | |||||||
SET_CTX_STDOUT_TO_DBMS_OUTPUT (new 21c) ![]() |
|||||||
Redirect the stdout stream of the MLE context to DBMS_OUTPUT | dbms_mle.set_ctx_stdout_to_dbms_output(context_handle IN context_handle_t); |
||||||
TBD | |||||||
SET_STDERR (new 21c) ![]() |
|||||||
Redirect the stderr stream of all MLE contexts to the given CLOB | dbms_mle.set_stderr(sink IN OUT NOCOPY CLOB CHARACTER SET ANY_CS); |
||||||
TBD | |||||||
SET_STDERR_TO_DBMS_OUTPUT (new 21c) ![]() |
|||||||
Redirect the stderr stream of all MLE contexts to DBMS_OUTPUT | dbms_mle.set_stderr_to_dbms_output; |
||||||
exec dbms_mle.set_stderr_to_dbms_output; |
|||||||
SET_STDOUT (new 21c) ![]() |
|||||||
Redirect the stdout stream of all MLE contexts to the given CLOB | dbms_mle.set_stdout(sink IN OUT NOCOPY CLOB CHARACTER SET ANY_CS); |
||||||
TBD | |||||||
SET_STDOUT_TO_DBMS_OUTPUT (new 21c) ![]() |
|||||||
Redirect the stdout stream of all MLE contexts to DBMS_OUTPUT | dbms_mle.set_stdout_to_dbms_output; |
||||||
exec dbms_mle.set_stdout_to_dbms_output; |
|||||||
Demo | |||||||
The demo, at right, is based on the demo in the Oracle docs | set serveroutput on; |
Related Topics |
Built-in Functions |
Built-in Packages |
Database Security |
What's New In 19c |
What's New In 20c-21c |
This site is maintained by Dan Morgan. Last Updated: | This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved | |||||||||
|
||||||||||