codekingpro/portable-devtools
114k
1{% macro APPLY(conn, type, role, param, privs, with_grant_privs) -%}2{% if privs %}3GRANT {{ privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(param) }} TO {{ role }};4{% endif %}5{% if with_grant_privs %}6GRANT {{ with_grant_privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(param) }} TO {{ role }} WITH GRANT OPTION;7{% endif %}8{%- endmacro %}9{% macro RESETALL(conn, type, role, param) -%}10REVOKE ALL ON {{ type }} {{ conn|qtIdent(param) }} FROM {{ role }};11{%- endmacro %}