dinedal / textql

Execute SQL against structured text like CSV or TSV
MIT License
9.06k stars 300 forks source link

Table name is in form of full file path on Windows #80

Closed vovcacik closed 6 years ago

vovcacik commented 6 years ago

Hi, textql is creating a table for each input file using the base filename without extension. However this is not the case on Windows where the table name is full path of file without extension (including colon and backslashes).

textql version: commit 01160a69ae3b9ea1258f979093c39ed6b59c8b46 OS: Windows 10

# trunk version with the bug
C:\textql>textql -console test.txt
SQLite version 3.22.0 2018-01-22 18:45:57
Enter ".help" for usage hints.
sqlite> .tables
C:\textql\test
sqlite> .quit

# trunk version with bugfix
C:\textql>textql -console test.txt
SQLite version 3.22.0 2018-01-22 18:45:57
Enter ".help" for usage hints.
sqlite> .tables
test
sqlite> .quit