File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ function tables(db::DB, sink = columntable)
784784 DBTable (
785785 tbl,
786786 Tables. schema (
787- DBInterface. execute (db, " SELECT * FROM $(tbl) LIMIT 0" ),
787+ DBInterface. execute (db, " SELECT * FROM $(esc_id ( tbl) ) LIMIT 0" ),
788788 ),
789789 ) for tbl in tblnames. name
790790 ]
Original file line number Diff line number Diff line change 118118 @test String[] == [t. name for t in tables_v]
119119 DBInterface. close! (db)
120120 end
121+
122+ @testset " #322: SQLite.tables should escape table name" begin
123+ db = SQLite. DB ()
124+ DBInterface. execute (db, " CREATE TABLE 'I.Js' (i INTEGER, j INTEGER)" )
125+ tables_v = SQLite. tables (db)
126+ @test [" I.Js" ] == [t. name for t in tables_v]
127+ DBInterface. close! (db)
128+ end
121129 end
122130
123131 @testset " Issue #207: 32 bit integers" begin
You can’t perform that action at this time.
0 commit comments