Пример #1
0
def ListPackages(Where=''):
    out = []
    DbConnection = sqlite3.connect('main.db')
    DbCursor = DbConnection.cursor()
    for row in DbCursor.execute("SELECT * FROM PACKAGES " + Where).fetchall():
        Obj = Wire()
        Obj.Id = row[0]
        Obj.Position = row[1]
        Obj.Destination = row[14]
        out.append(Obj)
    DbConnection.close()
    return out
Пример #2
0
def ListWires(Where=''):
    out = []
    DbConnection = sqlite3.connect('main.db')
    DbCursor = DbConnection.cursor()
    for row in DbCursor.execute("SELECT * FROM WIRES " + Where).fetchall():
        Obj = Wire()
        Obj.Id = row[0]
        Obj.Port1Id = row[1]
        Obj.Port2Id = row[2]
        out.append(Obj)
    DbConnection.close()
    return out