public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 1/1] BaseTools: delete unused file
       [not found] <cover.1539214181.git.jaben.carsey@intel.com>
@ 2018-10-10 23:30 ` Jaben Carsey
  2018-10-21 12:05   ` Zhu, Yonghong
  0 siblings, 1 reply; 2+ messages in thread
From: Jaben Carsey @ 2018-10-10 23:30 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu

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>
---
 BaseTools/Source/Python/Common/Database.py | 120 --------------------
 1 file changed, 120 deletions(-)

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] BaseTools: delete unused file
  2018-10-10 23:30 ` [PATCH v1 1/1] BaseTools: delete unused file Jaben Carsey
@ 2018-10-21 12:05   ` Zhu, Yonghong
  0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Yonghong @ 2018-10-21 12:05 UTC (permalink / raw)
  To: Carsey, Jaben, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zhu, Yonghong

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Carsey, Jaben 
Sent: Thursday, October 11, 2018 7:30 AM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [PATCH v1 1/1] BaseTools: delete unused file

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>
---
 BaseTools/Source/Python/Common/Database.py | 120 --------------------
 1 file changed, 120 deletions(-)

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-21 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1539214181.git.jaben.carsey@intel.com>
2018-10-10 23:30 ` [PATCH v1 1/1] BaseTools: delete unused file Jaben Carsey
2018-10-21 12:05   ` Zhu, Yonghong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox