X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FWorkspace%2FMetaFileTable.py;h=607225a0ef6028059a21fada8fdf872cedff6d15;hb=22a99b87c4d29ebaa8713ac8f04d9d0c11c3add5;hp=088a118de1a1e609864cd9cd99669984d5ded393;hpb=64b2609fcff9d6412eea4c74c8e74bed33dc3235;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index 088a118de1..607225a0ef 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -134,7 +134,7 @@ class ModuleTable(MetaFileTable): # # @retval: A recordSet of all found records # - def Query(self, Model, Arch=None, Platform=None): + def Query(self, Model, Arch=None, Platform=None, BelongsToItem=None): ConditionString = "Model=%s AND Enabled>=0" % Model ValueString = "Value1,Value2,Value3,Scope1,Scope2,ID,StartLine" @@ -142,6 +142,8 @@ class ModuleTable(MetaFileTable): ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Arch if Platform != None and Platform != 'COMMON': ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Platform + if BelongsToItem != None: + ConditionString += " AND BelongsToItem=%s" % BelongsToItem SqlCommand = "SELECT %s FROM %s WHERE %s" % (ValueString, self.Table, ConditionString) return self.Exec(SqlCommand)