KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_database.cpp File Reference
#include <fmt/core.h>
#include <boost/test/unit_test.hpp>
#include <database/database_connection.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (Connect)
 
 BOOST_AUTO_TEST_CASE (GeneratedColumns)
 Test that generated columns in SQLite are properly handled.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( GeneratedColumns )

Test that generated columns in SQLite are properly handled.

SQLite ODBC drivers use PRAGMA table_info to implement SQLColumns, which doesn't return generated columns. This test verifies that KiCad can still query tables with generated columns by trusting user-configured column names.

See https://gitlab.com/kicad/code/kicad/-/issues/16952

Definition at line 88 of file test_database.cpp.

References BOOST_CHECK_EQUAL(), DATABASE_CONNECTION::CacheTableInfo(), DATABASE_CONNECTION::IsConnected(), result, and DATABASE_CONNECTION::SelectOne().