myt/exporters/function.ejs

21 lines
453 B
Plaintext
Executable File

DROP FUNCTION IF EXISTS <%- schema %>.<%- name %>;
DELIMITER $$
CREATE DEFINER=<%- definer %> FUNCTION <%- schema %>.<%- name %>(<%- paramList %>)
RETURNS <%- returns %><%
if (isDeterministic == 'NO') { %>
NOT DETERMINISTIC<%
} else { %>
DETERMINISTIC<%
}
if (dataAccess) { %>
<%- dataAccess %><%
}
if (securityType == 'INVOKER') { %>
SQL SECURITY <%- securityType %><%
}
if (comment) { %>
COMMENT <%- comment %><%
} %>
<%- body %>$$
DELIMITER ;