pub struct Column<'t, S, T>(/* private fields */);Expand description
Values of this type reference a collumn in a query.
- The lifetime parameter 'tspecifies in which query the collumn exists.
- The type parameter Sspecifies the expected schema of the query.
- And finally the type paramter Tspecifies the type of the column.
Column implements Deref to have table extension methods in case the type is a table type.
Implementations§
Source§impl<'t, S, T: NumTyp> Column<'t, S, T>
 
impl<'t, S, T: NumTyp> Column<'t, S, T>
Sourcepub fn add(&self, rhs: impl IntoColumn<'t, S, Typ = T>) -> Column<'t, S, T>
 
pub fn add(&self, rhs: impl IntoColumn<'t, S, Typ = T>) -> Column<'t, S, T>
Add two columns together.
Sourcepub fn lt(&self, rhs: impl IntoColumn<'t, S, Typ = T>) -> Column<'t, S, bool>
 
pub fn lt(&self, rhs: impl IntoColumn<'t, S, Typ = T>) -> Column<'t, S, bool>
Compute the less than operator of two columns.
Source§impl<'t, S, T: EqTyp + 't> Column<'t, S, T>
 
impl<'t, S, T: EqTyp + 't> Column<'t, S, T>
Sourcepub fn eq(&self, rhs: impl IntoColumn<'t, S, Typ = T>) -> Column<'t, S, bool>
 
pub fn eq(&self, rhs: impl IntoColumn<'t, S, Typ = T>) -> Column<'t, S, bool>
Check whether two columns are equal.
Source§impl<'t, S> Column<'t, S, bool>
 
impl<'t, S> Column<'t, S, bool>
Source§impl<'t, S> Column<'t, S, String>
 
impl<'t, S> Column<'t, S, String>
Sourcepub fn starts_with(&self, pattern: impl AsRef<str>) -> Column<'t, S, bool>
 
pub fn starts_with(&self, pattern: impl AsRef<str>) -> Column<'t, S, bool>
Check if the column starts with the string pattern.
Matches case-sensitive. The pattern gets automatically escaped.
Sourcepub fn ends_with(&self, pattern: impl AsRef<str>) -> Column<'t, S, bool>
 
pub fn ends_with(&self, pattern: impl AsRef<str>) -> Column<'t, S, bool>
Check if the column ends with the string pattern.
Matches case-sensitive. The pattern gets automatically escaped.
Sourcepub fn contains(&self, pattern: impl AsRef<str>) -> Column<'t, S, bool>
 
pub fn contains(&self, pattern: impl AsRef<str>) -> Column<'t, S, bool>
Check if the column contains the string pattern.
Matches case-sensitive. The pattern gets automatically escaped.
Sourcepub fn like(
    &self,
    pattern: impl Into<String> + Clone + 't,
) -> Column<'t, S, bool>
 
pub fn like( &self, pattern: impl Into<String> + Clone + 't, ) -> Column<'t, S, bool>
Check if the column matches the pattern docs.
As noted in the docs, it is case-insensitive for ASCII characters. Other characters are case-sensitive.
For creating patterns it uses % as a wildcard for any sequence of characters and _ for any single character.
Special characters should be escaped with \.
Sourcepub fn glob(
    &self,
    rhs: impl IntoColumn<'t, S, Typ = String>,
) -> Column<'t, S, bool>
 
pub fn glob( &self, rhs: impl IntoColumn<'t, S, Typ = String>, ) -> Column<'t, S, bool>
Check if the column matches the pattern docs.
This is a case-sensitive version of like. It uses Unix file globbing syntax for wild
cards. * matches any sequence of characters and ? matches any single character. [0-9] matches
any single digit and [a-z] matches any single lowercase letter. ^ negates the pattern.