summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Workspace/MetaFileTable.py
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2013-11-18 07:41:21 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-18 07:41:21 +0000
commite8a47801a1dfdb148b1bfcd5bdc8ebc3bf51f92d (patch)
tree04e3ec271347360a5e9da898f1dccbce3d94681f /BaseTools/Source/Python/Workspace/MetaFileTable.py
parentfddbbc661eeff8e9f94942fa2d47fb637404a040 (diff)
downloadedk2-platforms-e8a47801a1dfdb148b1bfcd5bdc8ebc3bf51f92d.tar.xz
Sync BaseTool trunk (version r2610) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14856 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileTable.py')
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileTable.py4
1 files changed, 3 insertions, 1 deletions
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)