]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Table/Table.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / Table / Table.py
index c311df91c2ec10538f0b73a9abdae54d750d820d..e89b99320d1f697ef23d32ce46fb8b7cd5d12fe5 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase a common table\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 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
@@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger
 ## TableFile\r
 #\r
 # This class defined a common table\r
-# \r
+#\r
 # @param object:     Inherited from object class\r
 #\r
 # @param Cursor:     Cursor of the database\r
@@ -30,7 +30,7 @@ class Table(object):
         self.Cur = Cursor\r
         self.Table = ''\r
         self.ID = 0\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create a table\r
@@ -46,18 +46,18 @@ class Table(object):
     #\r
     def Insert(self, SqlCommand):\r
         self.Exec(SqlCommand)\r
-    \r
+\r
     ## Query table\r
     #\r
     # Query all records of the table\r
-    #  \r
+    #\r
     def Query(self):\r
         EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table)\r
         SqlCommand = """select * from %s""" % self.Table\r
         self.Cur.execute(SqlCommand)\r
         for Rs in self.Cur:\r
             EdkLogger.verbose(str(Rs))\r
-        \r
+\r
         TotalCount = self.GetCount()\r
         EdkLogger.verbose("*** Total %s records in table %s ***" % (TotalCount, self.Table) )\r
         EdkLogger.verbose("Query tabel %s DONE!" % self.Table)\r
@@ -70,7 +70,7 @@ class Table(object):
         SqlCommand = """drop table IF EXISTS %s""" % self.Table\r
         self.Cur.execute(SqlCommand)\r
         EdkLogger.verbose("Drop tabel %s ... DONE!" % self.Table)\r
-    \r
+\r
     ## Get count\r
     #\r
     # Get a count of all records of the table\r
@@ -82,12 +82,12 @@ class Table(object):
         self.Cur.execute(SqlCommand)\r
         for Item in self.Cur:\r
             return Item[0]\r
-    \r
+\r
     ## Generate ID\r
     #\r
     # Generate an ID if input ID is -1\r
     #\r
-    # @param ID:   Input ID \r
+    # @param ID:   Input ID\r
     #\r
     # @retval ID:  New generated ID\r
     #\r
@@ -96,14 +96,14 @@ class Table(object):
             self.ID = self.ID + 1\r
 \r
         return self.ID\r
-    \r
+\r
     ## Init the ID of the table\r
     #\r
     # Init the ID of the table\r
     #\r
     def InitID(self):\r
         self.ID = self.GetCount()\r
-    \r
+\r
     ## Exec\r
     #\r
     # Exec Sql Command, return result\r