def _between_condition(col_attr, value):
    if value[0] is not None and value[1] is not None:
        return col_attr.between(value[0], value[1])
    if value[0] is not None:
        return col_attr >= value[0]
    if value[1] is not None:
        return col_attr <= value[1]
    return None
Return sql range condition.
dataset/ETHPy150Open openstack/compass-core/compass/db/api/utils.py/_between_condition