Hi,
I have noticed that you escape table names with square brackets, e.g. [tableName]. However you probably forgot to do so in the code that handles the magic/short SQL syntax. This results in SQL query with unescaped table name.
textql version: commit 01160a69ae3b9ea1258f979093c39ed6b59c8b46
OS: Windows 10
Example use case where it can cause trouble:
# short SQL will fail
C:\textql>textql -sql "*" test.txt
2018/04/13 16:09:20 unrecognized token: ":"
# this is equivalent of the above (yes, the table name is full path without extension)
C:\textql>textql -sql "select * from C:\textql\test" test.txt
2018/04/13 16:09:28 unrecognized token: ":"
# escaping the table name helps
C:\textql>textql -sql "select * from [C:\textql\test]" test.txt
foo,bar
Hi, I have noticed that you escape table names with square brackets, e.g.
[tableName]
. However you probably forgot to do so in the code that handles the magic/short SQL syntax. This results in SQL query with unescaped table name.textql version: commit 01160a69ae3b9ea1258f979093c39ed6b59c8b46 OS: Windows 10
Example use case where it can cause trouble: