{% extends "base.html" %} {% block title %}Create query{% endblock %} {% block extra_head %} {{- super() -}} {% include "_codemirror.html" %} {% include "_execute_write_analysis_styles.html" %} {% endblock %} {% block body_class %}query-create db-{{ database|to_css_class }}{% endblock %} {% block crumbs %} {{ crumbs.nav(request=request, database=database) }} {% endblock %} {% block content %}

Create query

{{ urls.database(database) }}/

{% if analysis_error %}This query cannot be saved until the SQL is valid.{% elif not has_sql %}Enter SQL to analyze this query.{% elif analysis_is_write %}This query updates data in the database.{% else %}This is a read-only query.{% endif %} Queries marked private can only be seen by you, their creator.

{% if has_sql %}

Query operations

{% if analysis_error %}

{{ analysis_error }}

{% elif analysis_rows %}
{% for row in analysis_rows %} {% endfor %}
Operation Database Table Required permission Allowed
{{ row.operation }} {{ row.database }} {{ row.table }} {% if row.required_permission %}{{ row.required_permission }}{% else %}n/a{% endif %} {% if row.allowed is none %}n/a{% elif row.allowed %}yes{% else %}no{% endif %}
{% else %}

Analysis will show each affected table and required permission.

{% endif %} {% endif %}
{% include "_codemirror_foot.html" %} {% include "_sql_parameter_scripts.html" %} {% include "_execute_write_analysis_scripts.html" %} {% endblock %}