def select_all_models(restful): query = Models.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [ Models.model_name, Models.model_path, Models.dataset, Models.updated_on ]) query = query.order_by(*database.get_order_by(Models, restful.order_by)) return database.get_list(query, restful.pagination)
def select_role(restful): query = Role.query.filter_by(**restful.filters) query = database.full_text_search( query, restful.q, [User.username, User.first_name, User.last_name, User.email]) query = query.order_by(*database.get_order_by(User, restful.order_by)) return database.get_list(query, restful.pagination)
def get_attribute_list(restful): query = Attribute.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Attribute.attribute_name]) query = query.order_by(*database.get_order_by(Attribute, restful.order_by)) return database.get_list(query, restful.pagination)
def select_agent(restful): query = Agent.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Agent.area]) query = query.order_by(*database.get_order_by(Agent, restful.order_by)) return database.get_list(query, restful.pagination)
def select_all_camera(restful): query = Camera.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Camera.camera_id]) query = query.order_by(*database.get_order_by(Camera, restful.order_by)) # query = get_json_clean_response(Models.query.all()) return database.get_list(query, restful.pagination)
def select_all_attributes(restful): query = Image.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Image.flagging]) query = query.order_by(*database.get_order_by(Image, restful.order_by)) return database.get_list(query, restful.pagination)
def get_category_list(restful): query = Category.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Category.category_name]) query = query.order_by(*database.get_order_by(Category, restful.order_by)) return database.get_list(query, restful.pagination)
def select_image(restful): query = Image.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Image.area]) query = query.order_by(*database.get_order_by(Image, restful.order_by)) return database.get_list(query, restful.pagination)
def get_list(restful): query = Dataset.query.filter_by(**restful.filters) query = database.full_text_search(query, restful.q, [Dataset.area]) query = query.order_by(*database.get_order_by(Dataset, restful.order_by)) return database.get_list(query, restful.pagination)