]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: delete unused file
authorCarsey, Jaben <jaben.carsey@intel.com>
Wed, 10 Oct 2018 23:30:06 +0000 (07:30 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sun, 21 Oct 2018 12:06:03 +0000 (20:06 +0800)
this file is not imported/used.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/Database.py [deleted file]

diff --git a/BaseTools/Source/Python/Common/Database.py b/BaseTools/Source/Python/Common/Database.py
deleted file mode 100644 (file)
index 1c543ae..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-## @file\r
-# This file is used to create a database used by ECC tool\r
-#\r
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution.  The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-\r
-##\r
-# Import Modules\r
-#\r
-from __future__ import absolute_import\r
-import sqlite3\r
-import Common.LongFilePathOs as os\r
-\r
-from . import EdkLogger as EdkLogger\r
-from CommonDataClass.DataClass import *\r
-from .StringUtils import *\r
-from .DataType import *\r
-\r
-from Table.TableDataModel import TableDataModel\r
-from Table.TableFile import TableFile\r
-from Table.TableInf import TableInf\r
-from Table.TableDec import TableDec\r
-from Table.TableDsc import TableDsc\r
-\r
-## Database\r
-#\r
-# This class defined the build databse\r
-# During the phase of initialization, the database will create all tables and\r
-# insert all records of table DataModel\r
-#\r
-# @param object:      Inherited from object class\r
-# @param DbPath:      A string for the path of the ECC database\r
-#\r
-# @var Conn:          Connection of the ECC database\r
-# @var Cur:           Cursor of the connection\r
-# @var TblDataModel:  Local instance for TableDataModel\r
-#\r
-class Database(object):\r
-    def __init__(self, DbPath):\r
-        if os.path.exists(DbPath):\r
-            os.remove(DbPath)\r
-        self.Conn = sqlite3.connect(DbPath, isolation_level = 'DEFERRED')\r
-        self.Conn.execute("PRAGMA page_size=8192")\r
-        self.Conn.execute("PRAGMA synchronous=OFF")\r
-        self.Cur = self.Conn.cursor()\r
-        self.TblDataModel = TableDataModel(self.Cur)\r
-        self.TblFile = TableFile(self.Cur)\r
-        self.TblInf = TableInf(self.Cur)\r
-        self.TblDec = TableDec(self.Cur)\r
-        self.TblDsc = TableDsc(self.Cur)\r
-\r
-    ## Initialize build database\r
-    #\r
-    # 1. Delete all old existing tables\r
-    # 2. Create new tables\r
-    # 3. Initialize table DataModel\r
-    #\r
-    def InitDatabase(self):\r
-        EdkLogger.verbose("\nInitialize ECC database started ...")\r
-        #\r
-        # Drop all old existing tables\r
-        #\r
-#        self.TblDataModel.Drop()\r
-#        self.TblDsc.Drop()\r
-#        self.TblFile.Drop()\r
-\r
-        #\r
-        # Create new tables\r
-        #\r
-        self.TblDataModel.Create()\r
-        self.TblFile.Create()\r
-        self.TblInf.Create()\r
-        self.TblDec.Create()\r
-        self.TblDsc.Create()\r
-\r
-        #\r
-        # Initialize table DataModel\r
-        #\r
-        self.TblDataModel.InitTable()\r
-        EdkLogger.verbose("Initialize ECC database ... DONE!")\r
-\r
-    ## Query a table\r
-    #\r
-    # @param Table:  The instance of the table to be queried\r
-    #\r
-    def QueryTable(self, Table):\r
-        Table.Query()\r
-\r
-    ## Close entire database\r
-    #\r
-    # Commit all first\r
-    # Close the connection and cursor\r
-    #\r
-    def Close(self):\r
-        self.Conn.commit()\r
-        self.Cur.close()\r
-        self.Conn.close()\r
-\r
-##\r
-#\r
-# This acts like the main() function for the script, unless it is 'import'ed into another\r
-# script.\r
-#\r
-if __name__ == '__main__':\r
-    EdkLogger.Initialize()\r
-    EdkLogger.SetLevel(EdkLogger.DEBUG_0)\r
-\r
-    Db = Database(DATABASE_PATH)\r
-    Db.InitDatabase()\r
-    Db.QueryTable(Db.TblDataModel)\r
-    Db.QueryTable(Db.TblFile)\r
-    Db.QueryTable(Db.TblDsc)\r
-    Db.Close()\r