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
|
|
@ -116,6 +116,13 @@ CREATE TABLE "complex_foreign_keys" (
|
|||
FOREIGN KEY ("f3") REFERENCES [simple_primary_key](id)
|
||||
);
|
||||
|
||||
CREATE TABLE [select] (
|
||||
[group] text,
|
||||
[having] text,
|
||||
[and] text
|
||||
);
|
||||
INSERT INTO [select] VALUES ('group', 'having', 'and');
|
||||
|
||||
INSERT INTO simple_primary_key VALUES (1, 'hello');
|
||||
INSERT INTO simple_primary_key VALUES (2, 'world');
|
||||
INSERT INTO simple_primary_key VALUES (3, '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue