Skip to content

Non-existing column in table query breaks listing

At current version (1.0.11), if table query contains non-existing column, e.g. "_('Vaariable')" instead of "_('Variable')":

.. constdata:table:: conf_gettext.json
   :query: select "_('Vaariable')", "_('Description')" from "conf_gettext.json" where "_('Category')" = '_(''Project information'')'

error message is

WARNING: Can't list a table because 'conf_gettext.json' has no ID column with the name 'Variable'.

That is very confusing. The error should be similar to

Non-existing column "_('Vaariable')" in query.

Currently, the code doesn't check if a user typed existing columns properly.