3.4 Managing MLE Environments
MLE environments are schema objects that can be managed in the database. In the SQL Developer extension for VS Code, you can create, edit and delete MLE environments.
For more information about MLE, see Introduction to Oracle Database Multilingual Engine in the Oracle Database JavaScript Developer's Guide.
The actions available to you are:
3.4.1 Create an MLE Environment
To create an MLE environment:
-
In the Connections panel, for a specific connection, click the + icon in the MLE Environments node and then click Create.
The Create pane appears. -
In the MLE Environment Name field, enter a name for the environment.
The SQL pane displays the DDL code for the new MLE environment.
-
Click Apply.
An empty MLE environment is created and appears in the Connections panel under MLE Environments.
3.4.1.1 Example for Create an MLE Environment
This example demonstrates the creation of myfactorialenv MLE environment and how to import the factorial_mod JavaScript module into this environment.
-
In the Connections panel, right-click MLE Environments and then click Create.
The Create panel appears.
-
In the MLE Environment Name field, enter a name for the environment, myfactorialenv.
The SQL pane displays the DDL code for the new MLE environment.
-
Click Apply.
An empty myfactorialenv environment is created and appears in the left pane under MLE Environments.
-
In the Connections panel, expand MLE Environments, right-click myfactorialenv and click Add Imports.
The Add Imports pane appears.
- In Module Name field, select the module (factorial_mod) to import.
- In Import Name field, enter a name for your import.
-
Click Apply.
To view the imported module, in the Connections panel, right click myfactorialenv and select Open. Three tabs are displayed for the MLE environment: Errors, Grants and SQL.
The imported module appears in the Imports panel.
3.4.3 Compile an MLE Environment
To compile an MLE environment, in the Connections panel, right-click the selected environment name and select Compile.
To compile all MLE environments for a connection, in the Connections panel, right-click MLE environments and select Compile All.
To compile all invalid MLE environments, in the Connections panel, right-click MLE environments and select Compile All Invalid.