We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4ddffce + 416f9bb commit 73be137Copy full SHA for 73be137
3 files changed
CHANGELOG.md
@@ -8,7 +8,8 @@
8
9
### Bug Fixes
10
11
-* Fix the windows path shown in prompt to remove escaping.
+* Fix the [windows path](https://github.com/dbcli/litecli/issues/187) shown in prompt to remove escaping.
12
+* Fix a bug where if column name was same as table name it was [crashing](https://github.com/dbcli/litecli/issues/155) the autocompletion.
13
14
### Internal
15
litecli/sqlexecute.py
@@ -32,7 +32,7 @@ class SQLExecute(object):
32
table_columns_query = """
33
SELECT m.name as tableName, p.name as columnName
34
FROM sqlite_master m
35
- LEFT OUTER JOIN pragma_table_info((m.name)) p ON m.name <> p.name
+ JOIN pragma_table_info((m.name)) p
36
WHERE m.type IN ('table','view') AND m.name NOT LIKE 'sqlite_%'
37
ORDER BY tableName, columnName
38
"""
tests/test_sqlexecute.py
@@ -38,13 +38,15 @@ def test_binary(executor):
39
40
## Failing in Travis for some unknown reason.
41
-# @dbtest
42
-# def test_table_and_columns_query(executor):
43
-# run(executor, "create table a(x text, y text)")
44
-# run(executor, "create table b(z text)")
45
-
46
-# assert set(executor.tables()) == set([("a",), ("b",)])
47
-# assert set(executor.table_columns()) == set([("a", "x"), ("a", "y"), ("b", "z")])
+@dbtest
+def test_table_and_columns_query(executor):
+ run(executor, "create table a(x text, y text)")
+ run(executor, "create table b(z text)")
+ run(executor, "create table t(t text)")
+
+ assert set(executor.tables()) == set([("a",), ("b",), ("t",)])
48
+ assert set(executor.table_columns()) == set([("a", "x"), ("a", "y"), ("b", "z"), ("t", "t")])
49
50
51
52
@dbtest
0 commit comments