9.9 MLE
Use the MLE command to load JavaScript libraries to the database as MLE modules.
The sub-commands are:
- create-module: To create an MLE module.
- alter-module: To change an existing MLE module.
You can run the MLE commands in SQLcl using mle
.
To view the help information for MLE, enter help mle
.
Prerequisites
This command requires:
- Oracle Database Release 23ai.
-
The
CREATE TABLE
privilege is required for the create-module sub-command. If creating a module in another schema, then theCREATE ANY TABLE
privilege is required. - System privileges documented in the Oracle Database JavaScript Developer's Guide.
Create Module
Creates an MLE module.
Syntax
mle create-module {OPTIONS}
Options
Option | Description |
---|---|
Required | |
-filename <filename> |
The path to a valid JavaScript file. |
-module-name <module> |
The name of the module to create in the current schema. |
Optional | |
-if-not-exists |
Create the module only if it does not exist. |
-language <language> |
The name of a supported programming language. The default value is JavaScript. |
-metadata <metadata> |
Any valid JSON text that describes the module. This option is mutually exclusive with -metafile. |
-metafile <metafile> |
The path to a valid JSON file that describes the module. This option is mutually exclusive with -metadata. |
-replace |
Replace the module if it exists or create one if it does not exist. |
-schema <schema> |
The name of an alternate schema to own the module. |
–verbose |
Emit additional diagnostic information as the command makes progress. |
–version <version> |
The version of the programming language. |
Alter Module
Change an existing MLE module.
Syntax
mle alter-module {OPTIONS}
Options
Option | Description |
---|---|
Required | |
-module-name <module> |
The name of the module to change in the current schema. |
-metadata <metadata> |
Any valid JSON text that describes the module. This option is mutually exclusive with -metafile. |
-metafile <metafile> |
The path to a valid JSON file that describes the module. This option is mutually exclusive with -metadata. |
Optional | |
-if-exists |
Modify the module only if it exists. |
–verbose |
Emit additional diagnostic information as the command makes progress. |
-schema <schema> |
The name of an alternate schema that owns the module. |