{% extends "base.html" %} {% block title %}SQL console ยท {{ site.title }}{% endblock %} {% block content %}

SQL console

Allowed: {{ capabilities|join(", ") or "nothing" }} {% if allowed_tables %} Tables: {{ allowed_tables|join(", ") }} {% endif %} {% if denied_tables %} Denied: {{ denied_tables|join(", ") }} {% endif %} Row cap: {{ max_rows }}
{% if not read_only %}

This console can modify data. Statements run against the live database and are not undoable from here.

{% endif %}
{% if error %} {% endif %} {% if result %}
{{ result.capability }} {{ result.row_count }} row{{ "" if result.row_count == 1 else "s" }} {{ "%.3f"|format(result.seconds) }}s {% if result.truncated %} truncated at {{ max_rows }} rows {% endif %}
{% if result.columns %}
{% for column in result.columns %} {% endfor %} {% for row in result.rows %} {% for cell in row %} {% endfor %} {% endfor %}
{{ column }}
{% if cell is none %}NULL{% else %}{{ cell }}{% endif %}
{% if not result.rows %}

The query returned no rows.

{% endif %} {% else %}

Statement executed. {{ result.row_count }} row{{ "" if result.row_count == 1 else "s" }} affected.

{% endif %} {% endif %}
{% endblock %}