Lines Matching refs:self
29 def __init__(self, Cursor):
30 self.Cur = Cursor
31 self.Table = ''
32 self.ID = 0
38 def Create(self, SqlCommand):
39 self.Cur.execute(SqlCommand)
40 self.ID = 0
47 def Insert(self, SqlCommand):
48 self.Exec(SqlCommand)
54 def Query(self):
55 EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table)
56 SqlCommand = """select * from %s""" % self.Table
57 self.Cur.execute(SqlCommand)
58 for Rs in self.Cur:
61 TotalCount = self.GetCount()
62 EdkLogger.verbose("*** Total %s records in table %s ***" % (TotalCount, self.Table) )
63 EdkLogger.verbose("Query tabel %s DONE!" % self.Table)
69 def Drop(self):
70 SqlCommand = """drop table IF EXISTS %s""" % self.Table
71 self.Cur.execute(SqlCommand)
72 EdkLogger.verbose("Drop tabel %s ... DONE!" % self.Table)
80 def GetCount(self):
81 SqlCommand = """select count(ID) from %s""" % self.Table
82 self.Cur.execute(SqlCommand)
83 for Item in self.Cur:
94 def GenerateID(self, ID):
96 self.ID = self.ID + 1
98 return self.ID
104 def InitID(self):
105 self.ID = self.GetCount()
115 def Exec(self, SqlCommand):
117 self.Cur.execute(SqlCommand)
118 RecordSet = self.Cur.fetchall()