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 ;