Beispiel #1
0
def getHistoricalSplit(tickerName):
    tempData = sql.executeReturn('SELECT * FROM ' + tickerName)
    data = []

    for i in tempData:
        data.append([i[0], float(i[7])])

    return data
Beispiel #2
0
def getAllTables():
    allTables = sql.executeReturn("SELECT name FROM sqlite_master WHERE type = 'table';")
    tables = []
    
    for i in allTables:
        print(i)
        
    for i in allTables:
        tables.append(i[0])
    
    return tables
Beispiel #3
0
def getHistoricalPrices(tickerName):
    tempData = sql.executeReturn('SELECT * FROM ' + tickerName)

    data = []

    for i in tempData:
        temp = []
        for j in i:
            temp.append(j)
        data.append(temp)

    return data
Beispiel #4
0
def updateHistoricalPrice(tickerName):
    tableName = tickerName
    
    tempData = sql.executeReturn('SELECT * FROM ' + tableName)
    sqlData = []
    for i in tempData:
        temp = []
        for j in i:
            temp.append(j)
        sqlData.append(temp)
        
    newData = Download.updateHistoricalPrice(tickerName, sqlData) #@Unresolved
    
#     for i in newData:
#         print(i)
    insertMechanism(tickerName, newData)
Beispiel #5
0
def getAll():
    allTables = sql.executeReturn(
        "SELECT name FROM sqlite_master WHERE type = 'table';")
    return allTables