KiCad PCB EDA Suite
Loading...
Searching...
No Matches
database_autofill.h File Reference
#include <any>
#include <map>
#include <set>
#include <string>
#include <vector>
#include <kicommon.h>
#include <wx/string.h>
#include <wx/arrstr.h>

Go to the source code of this file.

Classes

struct  DB_AUTOFILL::ROLE
 One mapping to fill, such as the key column or the Value field. More...
 

Namespaces

namespace  DB_AUTOFILL
 Guesses the table and column mappings of a new database library from their names.
 

Functions

std::vector< std::string > DB_AUTOFILL::AssignColumns (const std::vector< std::string > &aColumns, const std::vector< ROLE > &aRoles)
 Chooses a column for each role, best scores first, so no column serves two roles.
 
std::string DB_AUTOFILL::MatchTable (const std::vector< std::string > &aTables, const std::string &aLibraryName)
 
std::map< std::string, size_t > DB_AUTOFILL::RepeatCounts (const std::vector< std::map< std::string, std::any > > &aRows)
 Counts, per column, the rows whose value already appeared in an earlier row, with NULL counted as empty.
 
void DB_AUTOFILL::RememberChoice (std::vector< std::string > &aHistory, const std::string &aColumn)
 Moves aColumn to the front of a role's history, dropping repeats and the oldest entries.