KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DATABASE_LIB_TABLE Struct Reference

A database library table will be mapped to a sub-library provided by the database library entry in the KiCad symbol/footprint library table. More...

#include <database_lib_settings.h>

Public Attributes

std::string name
 KiCad library nickname (will form part of the LIB_ID)
 
std::string table
 Database table to pull content from.
 
std::string key_col
 Unique key column name (will form part of the LIB_ID)
 
std::string symbols_col
 Column name containing KiCad symbol refs.
 
std::string footprints_col
 Column name containing KiCad footprint refs.
 
std::string pins_col
 Column name containing JSON pin assignments (optional)
 
MAPPABLE_SYMBOL_PROPERTIES properties
 
std::vector< DATABASE_FIELD_MAPPING > fields
 
nlohmann::json source
 Raw JSON as loaded; untouched keys are written back verbatim.
 

Detailed Description

A database library table will be mapped to a sub-library provided by the database library entry in the KiCad symbol/footprint library table.

A single database library config file (managed by this class) may contain more than one table mapping, and each will have its own nickname.

The LIB_ID for parts placed from this library will be constructed from the nickname of the database library itself, plus the nickname of the particular sub-library and the value of the key column for the placed part.

For example, if a database library is configured with the nickname "PartsDB" and it provides a table called "Capacitors", with key_col set to "Part Number", the LIB_ID for a capacitor placed from this table will look something like PartsDB-Capacitors:CAP-001

Definition at line 98 of file database_lib_settings.h.

Member Data Documentation

◆ fields

◆ footprints_col

std::string DATABASE_LIB_TABLE::footprints_col

Column name containing KiCad footprint refs.

Definition at line 104 of file database_lib_settings.h.

Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().

◆ key_col

◆ name

◆ pins_col

std::string DATABASE_LIB_TABLE::pins_col

Column name containing JSON pin assignments (optional)

Definition at line 105 of file database_lib_settings.h.

Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().

◆ properties

◆ source

nlohmann::json DATABASE_LIB_TABLE::source

Raw JSON as loaded; untouched keys are written back verbatim.

Definition at line 110 of file database_lib_settings.h.

Referenced by DATABASE_LIB_SETTINGS::tableToJson().

◆ symbols_col

std::string DATABASE_LIB_TABLE::symbols_col

Column name containing KiCad symbol refs.

Definition at line 103 of file database_lib_settings.h.

Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().

◆ table


The documentation for this struct was generated from the following file: