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
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
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
def delete_movable_object(id): db_wrapper = DBWrapper() db_wrapper.execute(Q.DELETE_MOVABLE_OBJECT % id) db_wrapper.dispose() return True
def delete_immobile_object(id): db_wrapper = DBWrapper() db_wrapper.execute(Q.DELETE_IMMOBILE_OBJECT % id) db_wrapper.dispose() return True
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
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
def delete_movable_type(id): db_wrapper = DBWrapper() db_wrapper.execute(Q.DELETE_MOVABLE_TYPE % id) db_wrapper.dispose() return True
def add_movable_type(data): db_wrapper = DBWrapper() result = db_wrapper.execute(Q.ADD_MOVABLE_TYPE % (data['name'])) db_wrapper.dispose() return result
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
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
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
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
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
def delete_all_location_points_for(id): db_wrapper = DBWrapper() db_wrapper.execute(Q.DELETE_LOCATION_POINTS_FOR % id) db_wrapper.dispose()