pub trait Comparable<'a> {
Show 27 methods
// Required methods
fn equals<T>(self, comparison: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn not_equals<T>(self, comparison: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn less_than<T>(self, comparison: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn less_than_or_equals<T>(self, comparison: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn greater_than<T>(self, comparison: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn greater_than_or_equals<T>(self, comparison: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn in_selection<T>(self, selection: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn not_in_selection<T>(self, selection: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn like<T>(self, pattern: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn not_like<T>(self, pattern: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn is_null(self) -> Compare<'a>;
fn is_not_null(self) -> Compare<'a>;
fn between<T, V>(self, left: T, right: V) -> Compare<'a>
where T: Into<Expression<'a>>,
V: Into<Expression<'a>>;
fn not_between<T, V>(self, left: T, right: V) -> Compare<'a>
where T: Into<Expression<'a>>,
V: Into<Expression<'a>>;
fn array_overlaps<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn array_contains<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn array_contained<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn json_array_not_contains<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn json_array_begins_with<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn json_array_not_begins_with<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn json_array_ends_into<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn json_array_not_ends_into<T>(self, item: T) -> Compare<'a>
where T: Into<Expression<'a>>;
fn json_type_equals<T>(self, json_type: T) -> Compare<'a>
where T: Into<JsonType<'a>>;
fn json_type_not_equals<T>(self, json_type: T) -> Compare<'a>
where T: Into<JsonType<'a>>;
fn any(self) -> Compare<'a>;
fn all(self) -> Compare<'a>;
fn compare_raw<T, V>(self, raw_comparator: T, right: V) -> Compare<'a>
where T: Into<Cow<'a, str>>,
V: Into<Expression<'a>>;
}
Expand description
An item that can be compared against other values in the database.
Required Methods§
Sourcefn equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if both sides are the same value.
Sourcefn not_equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn not_equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if both sides are not the same value.
Sourcefn less_than<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn less_than<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side is smaller than the right side.
Sourcefn less_than_or_equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn less_than_or_equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side is smaller than the right side or the same.
Sourcefn greater_than<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn greater_than<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side is bigger than the right side.
Sourcefn greater_than_or_equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn greater_than_or_equals<T>(self, comparison: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side is bigger than the right side or the same.
Sourcefn in_selection<T>(self, selection: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn in_selection<T>(self, selection: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side is included in the right side collection.
Sourcefn not_in_selection<T>(self, selection: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn not_in_selection<T>(self, selection: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side is not included in the right side collection.
Sourcefn like<T>(self, pattern: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn like<T>(self, pattern: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side includes the right side string.
Sourcefn not_like<T>(self, pattern: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn not_like<T>(self, pattern: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the left side does not include the right side string.
Sourcefn is_not_null(self) -> Compare<'a>
fn is_not_null(self) -> Compare<'a>
Tests if the left side is not NULL
.
Sourcefn between<T, V>(self, left: T, right: V) -> Compare<'a>
fn between<T, V>(self, left: T, right: V) -> Compare<'a>
Tests if the value is between two given values.
Sourcefn not_between<T, V>(self, left: T, right: V) -> Compare<'a>
fn not_between<T, V>(self, left: T, right: V) -> Compare<'a>
Tests if the value is not between two given values.
Sourcefn array_overlaps<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn array_overlaps<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the array overlaps with another array.
Sourcefn array_contains<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn array_contains<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the array contains another array.
Sourcefn array_contained<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn array_contained<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the JSON array contains a value.
Sourcefn json_array_not_contains<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn json_array_not_contains<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the JSON array does not contain a value.
Sourcefn json_array_begins_with<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn json_array_begins_with<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the JSON array starts with a value.
Sourcefn json_array_not_begins_with<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn json_array_not_begins_with<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the JSON array does not start with a value.
Sourcefn json_array_ends_into<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn json_array_ends_into<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the JSON array ends with a value.
Sourcefn json_array_not_ends_into<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
fn json_array_not_ends_into<T>(self, item: T) -> Compare<'a>where
T: Into<Expression<'a>>,
Tests if the JSON array does not end with a value.
Sourcefn json_type_equals<T>(self, json_type: T) -> Compare<'a>
fn json_type_equals<T>(self, json_type: T) -> Compare<'a>
Tests if the JSON value is of a certain type.
Sourcefn json_type_not_equals<T>(self, json_type: T) -> Compare<'a>
fn json_type_not_equals<T>(self, json_type: T) -> Compare<'a>
Tests if the JSON value is not of a certain type.
Sourcefn compare_raw<T, V>(self, raw_comparator: T, right: V) -> Compare<'a>
fn compare_raw<T, V>(self, raw_comparator: T, right: V) -> Compare<'a>
Compares two expressions with a custom operator.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.