2021-10-22 14:11:03 +00:00
|
|
|
DROP FUNCTION IF EXISTS <%- schema %>.<%- name %>;
|
2020-11-14 01:38:56 +00:00
|
|
|
DELIMITER $$
|
2021-10-22 14:11:03 +00:00
|
|
|
CREATE DEFINER=<%- definer %> FUNCTION <%- schema %>.<%- name %>(<%- paramList %>)
|
2022-02-07 14:43:12 +00:00
|
|
|
RETURNS <%- returns %><%
|
|
|
|
if (isDeterministic == 'NO') { %>
|
|
|
|
NOT DETERMINISTIC<%
|
|
|
|
} else { %>
|
|
|
|
DETERMINISTIC<%
|
|
|
|
}
|
|
|
|
if (dataAccess) { %>
|
|
|
|
<%- dataAccess %><%
|
|
|
|
}
|
|
|
|
if (securityType == 'INVOKER') { %>
|
|
|
|
SQL SECURITY <%- securityType %><%
|
|
|
|
}
|
|
|
|
if (comment) { %>
|
|
|
|
COMMENT <%- comment %><%
|
|
|
|
} %>
|
2020-11-14 01:38:56 +00:00
|
|
|
<%- body %>$$
|
|
|
|
DELIMITER ;
|