mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
escape_sqlite_table_name => escape_sqlite, handles reserved words
It can be used for column names as well as table names. Reserved word list from https://www.sqlite.org/lang_keywords.html
This commit is contained in:
parent
0e5f51adfe
commit
8f0d44d646
7 changed files with 68 additions and 25 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<form class="sql" action="/{{ database }}-{{ database_hash }}" method="get">
|
||||
<h3>Custom SQL query</h3>
|
||||
<p><textarea name="sql">select * from {{ tables[0].name|escape_table_name }}</textarea></p>
|
||||
<p><textarea name="sql">select * from {{ tables[0].name|escape_sqlite }}</textarea></p>
|
||||
<p><input type="submit" value="Run SQL"></p>
|
||||
</form>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue