SQLite ODBC drivers use PRAGMA table_info to implement SQLColumns,
which doesn't return generated columns. This caused KiCad to silently
ignore any generated column configured in a .kicad_dbl file.
Now CacheTableInfo trusts user-configured column names and adds them
to the cache even if the ODBC driver doesn't report them. If a column
truly doesn't exist, the subsequent query will fail with a clear error
rather than silently omitting the data.
Also adds a test case with a table containing a virtual generated column.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16952
Rather than modifying nanodbc to silently handle missing
SQLDescribeParam support, describe parameters in the application
before binding them. This approach keeps nanodbc pristine and
moves the workaround logic to KiCad where the issue occurs.
The fix pre-describes parameters as VARCHAR with size 255 in
DatabaseConnection::SelectOne before attempting to bind them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15880
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
Defer telling the statement about the connection until the
try block, because otherwise it can connect immediately and
potentially throw an exception if the connection fails.
(cherry picked from commit ddd7c35586)
Co-authored-by: Jon Evans <jon@craftyjon.com>
Since single-row queries are performed rapid-fire during certain actions like
stepping through the symbol browser, there is high value in caching them for
a small amount of time. The default cache parameters will keep results for
10 seconds, which errs on the side of getting fresh data from the database
on most user interactions.
Allows placing parts from an external database that reference symbols from another loaded library.
Includes:
- nanodbc wrapper
- database schematic library plugin
- basic tests
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7436