MySQL 9.0 Reference Manual Including MySQL NDB Cluster 9.0

27.3.1 JavaScript Stored Program Creation and Management

A stored function or stored procedure written in JavaScript is created, invoked, and maintained in much the same fashion as one written in SQL, subject to the differences listed here:

To obtain a listing of all JavaScript stored programs in all databases on the server, query the Information Schema ROUTINES table similarly to this:

mysql> SELECT CONCAT(ROUTINE_SCHEMA, '.', ROUTINE_NAME) AS "JS Stored Routines" 
    ->   FROM INFORMATION_SCHEMA.ROUTINES 
    ->   WHERE EXTERNAL_LANGUAGE="JAVASCRIPT";
+------------------------+
| JS Stored Routines     |
+------------------------+
| test.pc1               |
| test.pc2               |
| world.jssp_simple1     |
| test.jssp_vsimple      |
| test.jssp_simple       |
| world.jssp_vsimple     |
| world.jssp_vsimple2    |
| world.jssp_simple_meta |
+------------------------+
8 rows in set (0.00 sec)