{% extends 'base.html.j2' %} {# NateMan – Nachschreibtermin-Manager templates/admin/sql_access.html.j2 Copyright © 2020 Niklas Elsbrock This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . #} {% block title %}SQL-Zugriff{% endblock %} {% block header %}SQL-Zugriff{% endblock %} {# result: Ergebnis einer SQL-Abfrage als sqlalchemy.engine.ResultProxy #} {% block content %}

Diese Seite erlaubt direkten Zugriff auf die SQL-Datenbank von NateMan durch die Eingabe von SQL-Abfragen.
Bei falscher Anwendung können Daten unwiderruflich verloren gehen.
Außerdem kann es bei der Veränderung bestimmter Daten zu unerwarteten Fehlern in der NateMan-Anwendung kommen.
Benutzen Sie diese Seite nur, wenn Sie wissen, was Sie tun.

{% set nateman_erm_url = url_for('static', filename='img/nateman-erm.svg') %} Entity-Relationship-Modell der NateMan-Datenbank

{% if result is not none and result.returns_rows %} {% set result_rows = result.fetchall() %}

Ergebnis ({{ result_rows|length }} Zeilen):

{% for col_name in result.keys() %} {% endfor %} {% for row in result_rows %} {% for value in row._mapping.values() %} {% if value is none %} {% else %} {% endif %} {% endfor %} {% endfor %}
{{ col_name }}
NULL{{ value }}
{% endif %} {% endblock %}