dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.06k stars 67 forks source link

when insert to `table t(t text)` , raise an exception #155

Open one-pyy opened 1 year ago

one-pyy commented 1 year ago

create table t(t text);

Then type insert into t values( (not copy)

Unhandled exception in event loop:
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\buffer.py", line 1939, in new_coroutine
    await coroutine(*a, **kw)
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\buffer.py", line 1763, in async_completer
    async for completion in async_generator:
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\completion\base.py", line 326, in get_completions_async
    async for completion in completer.get_completions_async(
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\completion\base.py", line 326, in get_completions_async
    async for completion in completer.get_completions_async(
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\completion\base.py", line 202, in get_completions_async
    for item in self.get_completions(document, complete_event):
  File "D:\Miniconda3\lib\site-packages\litecli\sqlcompleter.py", line 468, in get_completions
    cols = self.find_matches(word_before_cursor, scoped_cols)
  File "D:\Miniconda3\lib\site-packages\litecli\sqlcompleter.py", line 421, in find_matches
    for item in sorted(collection):

Exception '<' not supported between instances of 'NoneType' and 'str'
Press ENTER to continue...

when create table q(a text);, it works great.

maybe it's because the same table name and column name