X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FTable%2FTableQuery.py;h=4ad9dc5e5507e4eacb5227c4e19ecd6458e9480a;hp=9a9a66ccb6a7624d56d740d16837ae4652bfb8b3;hb=52302d4dee589a5df43a464420c9fe68ba83937d;hpb=fe35c036354c4b6bf18c4699a45156f3965fae2a diff --git a/BaseTools/Source/Python/Table/TableQuery.py b/BaseTools/Source/Python/Table/TableQuery.py index 9a9a66ccb6..4ad9dc5e55 100644 --- a/BaseTools/Source/Python/Table/TableQuery.py +++ b/BaseTools/Source/Python/Table/TableQuery.py @@ -21,7 +21,7 @@ from Table import Table ## TableQuery # # This class defined a table used for Query -# +# # @param object: Inherited from object class # # @@ -29,19 +29,21 @@ class TableQuery(Table): def __init__(self, Cursor): Table.__init__(self, Cursor) self.Table = 'Query' - + ## Create table # # Create table Query # # @param ID: ID of a Query - # @param Name: Modifier of a Query + # @param Name: Name of a Query + # @param Modifer: Modifier of a Query # @param Value: Type of a Query # @param Model: Model of a Query # def Create(self): SqlCommand = """create table IF NOT EXISTS %s(ID INTEGER PRIMARY KEY, Name TEXT DEFAULT '', + Modifier TEXT DEFAULT '', Value TEXT DEFAULT '', Model INTEGER DEFAULT 0 )""" % self.Table @@ -52,15 +54,15 @@ class TableQuery(Table): # Insert a record into table Query # # @param ID: ID of a Query - # @param Name: Modifier of a Query - # @param Value: Type of a Query + # @param Name: Name of a Query + # @param Modifier: Modifier of a Query + # @param Value: Value of a Query # @param Model: Model of a Query # - def Insert(self, Name, Value, Model): + def Insert(self, Name, Modifier, Value, Model): self.ID = self.ID + 1 - SqlCommand = """insert into %s values(%s, '%s', '%s', %s)""" \ - % (self.Table, self.ID, Name, Value, Model) + SqlCommand = """insert into %s values(%s, '%s', '%s', '%s', %s)""" \ + % (self.Table, self.ID, Name, Modifier, Value, Model) Table.Insert(self, SqlCommand) return self.ID - \ No newline at end of file