Esempio n. 1
0
def add_immobile_object(data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(
        Q.ADD_IMMOBILE_OBJECT % (data['name'], data.get(
            'phone', ''), data['latitude'], data['longitude']))
    db_wrapper.dispose()
    return result
Esempio n. 2
0
def update_immobile_object(id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(
        Q.UPDATE_IMMOBILE_OBJECT % (data['name'], data.get(
            'phone', ''), data['latitude'], data['longitude'], id))
    db_wrapper.dispose()
    return result
Esempio n. 3
0
def add_location_point(movable_object_id, hour, minute, second, latitude,
                       longitude):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(
        Q.ADD_LOCATION_POINT %
        (movable_object_id, hour, minute, second, latitude, longitude))
    db_wrapper.dispose()
    return result
Esempio n. 4
0
def delete_movable_object(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_MOVABLE_OBJECT % id)
    db_wrapper.dispose()
    return True
Esempio n. 5
0
def delete_immobile_object(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_IMMOBILE_OBJECT % id)
    db_wrapper.dispose()
    return True
Esempio n. 6
0
def add_immobile_object(data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.ADD_IMMOBILE_OBJECT % (data['name'], data.get('phone', ''), data['latitude'], data['longitude']))
    db_wrapper.dispose()
    return result
Esempio n. 7
0
def update_movable_type(id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.UPDATE_MOVABLE_TYPE % (data['name'], id))
    db_wrapper.dispose()
    return result
Esempio n. 8
0
def delete_movable_type(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_MOVABLE_TYPE % id)
    db_wrapper.dispose()
    return True
Esempio n. 9
0
def update_movable_type(id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.UPDATE_MOVABLE_TYPE % (data['name'], id))
    db_wrapper.dispose()
    return result
Esempio n. 10
0
def add_movable_type(data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.ADD_MOVABLE_TYPE % (data['name']))
    db_wrapper.dispose()
    return result
Esempio n. 11
0
def delete_movable_type(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_MOVABLE_TYPE % id)
    db_wrapper.dispose()
    return True
Esempio n. 12
0
def update_movable_object(id, movable_type_id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.UPDATE_MOVABLE_OBJECT % (data['name'],movable_type_id, id))
    db_wrapper.dispose()
    return result
Esempio n. 13
0
def add_movable_object(movable_type_id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.ADD_MOVABLE_OBJECT % (data['name'], movable_type_id))
    db_wrapper.dispose()
    return result
Esempio n. 14
0
def delete_movable_object(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_MOVABLE_OBJECT % id)
    db_wrapper.dispose()
    return True
Esempio n. 15
0
def update_immobile_object(id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.UPDATE_IMMOBILE_OBJECT % (data['name'], data.get('phone', ''), data['latitude'], data['longitude'], id))
    db_wrapper.dispose()
    return result
Esempio n. 16
0
def add_movable_object(movable_type_id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.ADD_MOVABLE_OBJECT %
                                (data['name'], movable_type_id))
    db_wrapper.dispose()
    return result
Esempio n. 17
0
def update_movable_object(id, movable_type_id, data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.UPDATE_MOVABLE_OBJECT %
                                (data['name'], movable_type_id, id))
    db_wrapper.dispose()
    return result
Esempio n. 18
0
def add_location_point(movable_object_id , hour, minute, second, latitude, longitude):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.ADD_LOCATION_POINT % (movable_object_id , hour, minute, second, latitude, longitude))
    db_wrapper.dispose()
    return result
Esempio n. 19
0
def add_movable_type(data):
    db_wrapper = DBWrapper()
    result = db_wrapper.execute(Q.ADD_MOVABLE_TYPE % (data['name']))
    db_wrapper.dispose()
    return result
Esempio n. 20
0
def delete_all_location_points_for(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_LOCATION_POINTS_FOR % id)
    db_wrapper.dispose()
Esempio n. 21
0
def delete_all_location_points_for(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_LOCATION_POINTS_FOR % id)
    db_wrapper.dispose()
Esempio n. 22
0
def delete_immobile_object(id):
    db_wrapper = DBWrapper()
    db_wrapper.execute(Q.DELETE_IMMOBILE_OBJECT % id)
    db_wrapper.dispose()
    return True