myt/exporters/function.ejs

21 lines
488 B
Plaintext
Executable File

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