Ejemplo n.º 1
0
 def doTimeRandEtc(self, nSize):
     info = { }
     for a in range(nSize):
         nRand = randint(1000, 999999)
         
         info['a'] = a + 1
         info['b'] = nRand
         info['c'] = getCheckNumber(nRand)
         x = strInsert % info 
Ejemplo n.º 2
0
 def doSelectTest2(self, nRange):
     """
     SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%one%';
     SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%two%';
     """
     info = ['']
     nStart = 0
     for nIndex in range(nRange):
         info[0] = getCheckNumber(nIndex + 1)
         nStart += 100
         self.cursor.execute(strSelect2, info)
Ejemplo n.º 3
0
 def doInsertTest2(self, nRange):
     global strInsert
     
     info = [0, 0, '']
     for a in range(nRange):
         nRand = randint(1000, 999999)
         
         info[0] = a + 1
         info[1] = nRand
         info[2] = getCheckNumber(nRand)
         self.cursor.execute(strInsertT2, info)
             
     self.conn.commit()
Ejemplo n.º 4
0
 def doInsertTest1(self, bCommitEach, nRange):
     global strInsert
     
     info = [0, 0, '']
     for a in range(nRange):
         nRand = randint(1000, 999999)
         
         info[0] = a + 1
         info[1] = int(nRand)
         info[2] = getCheckNumber(nRand)
         self.cursor.execute(strInsertT1, info)
         if bCommitEach:
             self.conn.commit()
             
     self.conn.commit()