Release 0.1.3
sripathikrishnan
released this
26 Oct 06:24
·
68 commits
to master
since this release
With this release, we are using Jinja's autoescape feature. As a result, the output of a macro is now considered SQL safe. This eliminates the need to manually invoke the |sqlsafe filter.
Earlier:
{% macro week(value) -%}
some_sql_function({{value}})
{%- endmacro %}
SELECT 'x' from dual WHERE created_date > {{ week(request.start_date) | sqlsafe }}
Now:
{% macro week(value) -%}
some_sql_function({{value}})
{%- endmacro %}
SELECT 'x' from dual WHERE created_date > {{ week(request.start_date) }}
Notice that you don't need |sqlsafe filter when invoking the week macro.