1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-19 16:59:35 +01:00

Don’t list known absent attributes in listChildren

This commit is contained in:
regnat 2021-06-09 18:47:39 +02:00
parent af775bdcf9
commit 28c1f8800b

View file

@ -63,7 +63,7 @@ struct AttrDb
"select id, type, value, context from Attributes where parent = ? and name = ?");
state->queryAttributes.create(state->db,
"select name from Attributes where parent = ?");
"select name, type from Attributes where parent = ?");
state->txn = std::make_unique<SQLiteTxn>(state->db);
}
@ -198,8 +198,10 @@ struct AttrDb
auto queryAttributes(state->queryAttributes.use()(parentId));
while (queryAttributes.next())
while (queryAttributes.next()) {
if (queryAttributes.getInt(1) != AttrType::Missing)
res.push_back(queryAttributes.getStr(0));
}
return res;
}