Call Specifications for Functions
Call specifications for modules and inline MLE call specifications allow you to implement JavaScript functionality.
Functions exported by an MLE JavaScript module can be published by creating call specifications. A JavaScript function published with a call specification can be called from anywhere a PL/SQL function or procedure can be called.
Alternatively, inline MLE call specifications can be used to embed JavaScript code directly in the DDL. This option can be advantageous when you want to quickly implement a simple functionality using JavaScript.
Topics
- Creating a Call Specification for an MLE Module
MLE call specification creation uses the genericCREATE FUNCTION RETURNS AS
orCREATE PROCEDURE AS
syntax, followed by MLE specific syntax. - Creating an Inline MLE Call Specification
Inline MLE call specifications embed JavaScript code directly in theCREATE FUNCTION
andCREATE PROCEDURE
DDLs. - Choosing Inline Versus Module MLE Call Specifications
Each option provides its own advantages and disadvantages depending on your use case. - Runtime Isolation for an MLE Call Specification
MLE uses execution contexts to maintain runtime state isolation. Call specifications are associated with separate contexts when they do not share the same user, module, and environment. - Dictionary Views for Call Specifications
Metadata about JavaScript call specifications is available in the data dictionary using the[USER | ALL | DBA | CDB]_MLE_PROCEDURES
views. The family of views maps call specifications (package, function, procedure) to JavaScript modules. This dictionary view is closely modeled after the*_PROCEDURES
views.
Parent topic: MLE JavaScript Functions