{% if result.kind == 'error' %}
{{ result.error }}
{% elif result.kind == 'affected' %} {% if result.affected >= 0 %}

Rows modified: {{ result.affected }}

{% else %}

Done.

{% endif %} {% elif not result.rows %}

Empty result set.

{% else %}
{% if show_bulk %} {% endif %} {% for col in result.columns %} {% endfor %} {% for row in result.rows %} {% if show_bulk %} {% endif %} {% for value in row %} {% set fk = fk_lookup and fk_lookup.get(result.columns[loop.index0]) %} {% if value is none %}NULL{% elif fk %}{{ value }}{% else %}{{ value|value_filter|safe }}{% endif %} {% endfor %} {% endfor %}
{% if in_script %} {{ col }} {% else %} {% set target = (-loop.index if loop.index == ordering else loop.index) %} {{ col }}{% if ordering %}{% if loop.index == ordering %}▼{% elif loop.index == -ordering %}▲{% endif %}{% endif %} {% endif %}
{% if show_detail %} {% endif %} {% if show_edit %} {% endif %}
{% if in_script and result.has_next %}

Showing first {{ result.rows|length }} rows.

{% endif %} {% endif %}