Beispiel #1
0
def insertMechanism(tickerName, data):
    sql.execute('DROP TABLE IF EXISTS ' + tickerName, None)
    sql.execute('CREATE TABLE ' + tickerName + '(CC0 TEXT, CC1 TEXT, CC2 TEXT, CC3 TEXT, CC4 TEXT, CC5 TEXT, CC6 TEXT, CC7 TEXT)', None)
    
    totalText = ''
    for i in data:
        totalText += '('
        for j in i:
            totalText += "'" + str(j) + "',"
        totalText = totalText[0:len(totalText) -1 ]
        totalText += '),'
#             tempArray.append(j)
#         totalText += valuesText + ','
    
    totalText = totalText[0:len(totalText)-1]
    sql.execute('INSERT INTO ' + tickerName + ' VALUES ' + totalText , None)
Beispiel #2
0
def vacuum():
    sql.execute("VACUUM", None)
Beispiel #3
0
def removeTicker(tickerName):
    sql.execute('DROP TABLE IF EXISTS ' + tickerName, None)