kicad: also use parent description

This commit is contained in:
King Kévin 2023-04-01 10:54:48 +02:00
parent 2f650428ca
commit b0e5df8d60

View File

@ -60,7 +60,8 @@ categories.each do |category|
table = "kicad_lib_" + category.downcase.gsub(/[- \/]/,"_")
db.query("DROP VIEW IF EXISTS #{table}")
view = "CREATE VIEW #{table} AS "
view += "SELECT part.id, part.name, part.description, "
view += "SELECT part.id, part.name, "
view += "COALESCE(part.description,parent.description) AS description, "
(prop2view + dist2view).each do |prop|
view += "COALESCE(#{prop[:table]}1.#{prop[:property]},#{prop[:table]}2.#{prop[:property]}) AS #{prop[:property]}, "
end