diff options
author | Liming Gao <liming.gao@intel.com> | 2018-07-05 17:40:04 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-07-09 10:25:47 +0800 |
commit | f7496d717357b9af78414d19679b073403812340 (patch) | |
tree | 67621e65fd181bdf8a12d12e7706579beaaed0fb /BaseTools/Source/Python/Table/Table.py | |
parent | 39456d00f36e04b7e7efb208f350f4e83b6c3531 (diff) | |
download | edk2-f7496d717357b9af78414d19679b073403812340.tar.gz edk2-f7496d717357b9af78414d19679b073403812340.tar.bz2 edk2-f7496d717357b9af78414d19679b073403812340.zip |
BaseTools: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Table/Table.py')
-rw-r--r-- | BaseTools/Source/Python/Table/Table.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/BaseTools/Source/Python/Table/Table.py b/BaseTools/Source/Python/Table/Table.py index c311df91c2..e89b99320d 100644 --- a/BaseTools/Source/Python/Table/Table.py +++ b/BaseTools/Source/Python/Table/Table.py @@ -1,7 +1,7 @@ ## @file
# This file is used to create/update/query/erase a common table
#
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 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
@@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger ## TableFile
#
# This class defined a common table
-#
+#
# @param object: Inherited from object class
#
# @param Cursor: Cursor of the database
@@ -30,7 +30,7 @@ class Table(object): self.Cur = Cursor
self.Table = ''
self.ID = 0
-
+
## Create table
#
# Create a table
@@ -46,18 +46,18 @@ class Table(object): #
def Insert(self, SqlCommand):
self.Exec(SqlCommand)
-
+
## Query table
#
# Query all records of the table
- #
+ #
def Query(self):
EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table)
SqlCommand = """select * from %s""" % self.Table
self.Cur.execute(SqlCommand)
for Rs in self.Cur:
EdkLogger.verbose(str(Rs))
-
+
TotalCount = self.GetCount()
EdkLogger.verbose("*** Total %s records in table %s ***" % (TotalCount, self.Table) )
EdkLogger.verbose("Query tabel %s DONE!" % self.Table)
@@ -70,7 +70,7 @@ class Table(object): SqlCommand = """drop table IF EXISTS %s""" % self.Table
self.Cur.execute(SqlCommand)
EdkLogger.verbose("Drop tabel %s ... DONE!" % self.Table)
-
+
## Get count
#
# Get a count of all records of the table
@@ -82,12 +82,12 @@ class Table(object): self.Cur.execute(SqlCommand)
for Item in self.Cur:
return Item[0]
-
+
## Generate ID
#
# Generate an ID if input ID is -1
#
- # @param ID: Input ID
+ # @param ID: Input ID
#
# @retval ID: New generated ID
#
@@ -96,14 +96,14 @@ class Table(object): self.ID = self.ID + 1
return self.ID
-
+
## Init the ID of the table
#
# Init the ID of the table
#
def InitID(self):
self.ID = self.GetCount()
-
+
## Exec
#
# Exec Sql Command, return result
|