pub fn lower_inc<R: MultirangeOrRangeMaybeNullable + SingleValue + MaybeNullableValue<Bool>, range>(
range: range,
) -> lower_inc<R, range>where
range: AsExpression<R>,
Available on crate feature
postgres_backend
only.Expand description
Returns true if the range’s lower bound is inclusive
§Example
let int = diesel::select(lower_inc::<Range<Integer>, _>(1..5)).get_result::<bool>(connection)?;
assert_eq!(true, int);
let int = diesel::select(lower_inc::<Range<Integer>, _>(..5)).get_result::<bool>(connection)?;
assert_eq!(false, int);
let int = diesel::select(lower_inc::<Nullable<Range<Integer>>, _>(None::<std::ops::Range<i32>>)).get_result::<Option<bool>>(connection)?;
assert_eq!(None, int);
let int = diesel::select(lower_inc::<Multirange<Integer>, _>(vec![5..7])).get_result::<bool>(connection)?;
assert_eq!(true, int);