use build_filter_conditions from db_query