X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FTable%2FTableDec.py;h=04aa7aaad8b125d103185c503d9fb714d4baff50;hp=97139c58d893215506174b6d73375e6840cbd6e7;hb=HEAD;hpb=5a57246eab80f00ae2481970d12a2abc345a2730 diff --git a/BaseTools/Source/Python/Table/TableDec.py b/BaseTools/Source/Python/Table/TableDec.py index 97139c58d8..04aa7aaad8 100644 --- a/BaseTools/Source/Python/Table/TableDec.py +++ b/BaseTools/Source/Python/Table/TableDec.py @@ -1,28 +1,23 @@ ## @file # This file is used to create/update/query/erase table for dec datas # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
-# 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. +# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # +from __future__ import absolute_import import Common.EdkLogger as EdkLogger import CommonDataClass.DataClass as DataClass -from Table import Table +from Table.Table import Table from Common.StringUtils import ConvertToSqlString ## TableDec # # This class defined a table used for data model -# +# # @param object: Inherited from object class # # @@ -30,7 +25,7 @@ class TableDec(Table): def __init__(self, Cursor): Table.__init__(self, Cursor) self.Table = 'Dec' - + ## Create table # # Create table Dec @@ -90,14 +85,14 @@ class TableDec(Table): SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \ % (self.Table, self.ID, Model, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled) Table.Insert(self, SqlCommand) - + return self.ID - + ## Query table # - # @param Model: The Model of Record + # @param Model: The Model of Record # - # @retval: A recordSet of all found records + # @retval: A recordSet of all found records # def Query(self, Model): SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s