summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Workspace/MetaDataTable.py
diff options
context:
space:
mode:
authorPierre Gondois <pierre.gondois@arm.com>2025-04-30 15:45:13 +0300
committerLiming Gao <gaoliming@byosoft.com.cn>2025-07-01 04:51:38 +0300
commit2d6b8d5ac951ee432512ca28db41ce32d0616849 (patch)
tree409c5f34b6c452ff152fb78848ba6d215177c1b8 /BaseTools/Source/Python/Workspace/MetaDataTable.py
parent70d53c2df096d1789061f21b56cba34558a0c46d (diff)
downloadedk2-2d6b8d5ac951ee432512ca28db41ce32d0616849.tar.xz
BaseTools: WorkSpace: Remove unnecessary code
Running the vulture tool on the WorkSpace folder gave the following report. Remove the unnecessary code. - Workspace/BuildClassObject.py:148: unused method 'IsSimpleTypeArray' (60% confidence) - Workspace/BuildClassObject.py:337: unused method 'SetPcdMode' (60% confidence) - Workspace/BuildClassObject.py:612: unused attribute 'DscSpecification' (60% confidence) - Workspace/DscBuildData.py:451: unused property 'DscSpecification' (60% confidence) - Workspace/DscBuildData.py:1253: unused method 'GetBuildOptionsByPkg' (60% confidence) - Workspace/DscBuildData.py:2064: unused method 'GetStarNum' (60% confidence) - Workspace/DscBuildData.py:3613: unused method 'AddModule' (60% confidence) - Workspace/DscBuildData.py:3650: unused method 'AddPcd' (60% confidence) - Workspace/InfBuildData.py:117: unused attribute '_TailComments' (60% confidence) - Workspace/InfBuildData.py:126: unused attribute '_BinaryModule' (60% confidence) - Workspace/MetaDataTable.py:114: unused method 'IsIntegral' (60% confidence) - Workspace/MetaDataTable.py:218: unused method 'GetFileTimeStamp' (60% confidence) - Workspace/MetaDataTable.py:230: unused method 'SetFileTimeStamp' (60% confidence) - Workspace/MetaDataTable.py:298: unused method 'GetCrossIndex' (60% confidence) - Workspace/MetaFileParser.py:161: unused attribute '_FileDir' (60% confidence) - Workspace/MetaFileParser.py:1187: unused method '_DecodeCODEData' (60% confidence) - Workspace/MetaFileParser.py:1796: unused attribute '_RestofValue' (60% confidence) - Workspace/MetaFileTable.py:31: unused attribute '_NumpyTab' (60% confidence) - Workspace/WorkspaceDatabase.py:136: unused class 'TransformObjectFactory' (60% confidence) - Workspace/WorkspaceDatabase.py:159: unused attribute 'TransformObject' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaDataTable.py')
-rw-r--r--BaseTools/Source/Python/Workspace/MetaDataTable.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaDataTable.py b/BaseTools/Source/Python/Workspace/MetaDataTable.py
index a20bd14784..325d01ae04 100644
--- a/BaseTools/Source/Python/Workspace/MetaDataTable.py
+++ b/BaseTools/Source/Python/Workspace/MetaDataTable.py
@@ -110,14 +110,6 @@ class Table(object):
Tab = self.Db.GetTable(self.Table)
Tab.append(self._DUMMY_)
-
- def IsIntegral(self):
- tab = self.Db.GetTable(self.Table)
- Id = min([int(item[0]) for item in tab])
- if Id != -1:
- return False
- return True
-
def GetAll(self):
tab = self.Db.GetTable(self.Table)
return tab
@@ -209,27 +201,6 @@ class TableFile(Table):
return None
return RecordList[0][0]
- ## Get file timestamp of a given file
- #
- # @param FileId ID of file
- #
- # @retval timestamp TimeStamp value of given file in the table
- #
- def GetFileTimeStamp(self, FileId):
- QueryScript = "select TimeStamp from %s where ID = '%s'" % (self.Table, FileId)
- RecordList = self.Exec(QueryScript)
- if len(RecordList) == 0:
- return None
- return RecordList[0][0]
-
- ## Update the timestamp of a given file
- #
- # @param FileId ID of file
- # @param TimeStamp Time stamp of file
- #
- def SetFileTimeStamp(self, FileId, TimeStamp):
- self.Exec("update %s set TimeStamp=%s where ID='%s'" % (self.Table, TimeStamp, FileId))
-
## Get list of file with given type
#
# @param FileType Type value of file
@@ -287,20 +258,3 @@ class TableDataModel(Table):
Description = Item[0]
self.Insert(CrossIndex, Name, Description)
EdkLogger.verbose("Initialize table DataModel ... DONE!")
-
- ## Get CrossIndex
- #
- # Get a model's cross index from its name
- #
- # @param ModelName: Name of the model
- # @retval CrossIndex: CrossIndex of the model
- #
- def GetCrossIndex(self, ModelName):
- CrossIndex = -1
- SqlCommand = """select CrossIndex from DataModel where name = '""" + ModelName + """'"""
- self.Db.execute(SqlCommand)
- for Item in self.Db:
- CrossIndex = Item[0]
-
- return CrossIndex
-