pub struct Text;
Expand description
The text SQL type.
On all backends strings must be valid UTF-8. On PostgreSQL strings must not include nul bytes.
Schema inference will treat all variants of TEXT
as this type (e.g.
VARCHAR
, MEDIUMTEXT
, etc).
ToSql
impls
FromSql
impls
Trait Implementations
sourceimpl<'expr, 'a> AsExpression<Text> for &'expr MigrationVersion<'a>
impl<'expr, 'a> AsExpression<Text> for &'expr MigrationVersion<'a>
type Expression = Bound<Text, &'expr MigrationVersion<'a>>
type Expression = Bound<Text, &'expr MigrationVersion<'a>>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'expr> AsExpression<Text> for &'expr String
impl<'expr> AsExpression<Text> for &'expr String
type Expression = Bound<Text, &'expr String>
type Expression = Bound<Text, &'expr String>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'expr> AsExpression<Text> for &'expr str
impl<'expr> AsExpression<Text> for &'expr str
type Expression = Bound<Text, &'expr str>
type Expression = Bound<Text, &'expr str>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'expr2, 'expr, 'a> AsExpression<Text> for &'expr2 &'expr MigrationVersion<'a>
impl<'expr2, 'expr, 'a> AsExpression<Text> for &'expr2 &'expr MigrationVersion<'a>
type Expression = Bound<Text, &'expr2 &'expr MigrationVersion<'a>>
type Expression = Bound<Text, &'expr2 &'expr MigrationVersion<'a>>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr String
impl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr String
type Expression = Bound<Text, &'expr2 &'expr String>
type Expression = Bound<Text, &'expr2 &'expr String>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr str
impl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr str
type Expression = Bound<Text, &'expr2 &'expr str>
type Expression = Bound<Text, &'expr2 &'expr str>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'a> AsExpression<Text> for MigrationVersion<'a>
impl<'a> AsExpression<Text> for MigrationVersion<'a>
type Expression = Bound<Text, MigrationVersion<'a>>
type Expression = Bound<Text, MigrationVersion<'a>>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl AsExpression<Text> for String
impl AsExpression<Text> for String
type Expression = Bound<Text, String>
type Expression = Bound<Text, String>
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
sourceimpl<'a, DB> FromSql<Text, DB> for MigrationVersion<'a>where
String: FromSql<Text, DB>,
DB: Backend,
impl<'a, DB> FromSql<Text, DB> for MigrationVersion<'a>where
String: FromSql<Text, DB>,
DB: Backend,
sourceimpl FromSql<Text, Mysql> for *const str
Available on crate feature mysql_backend
only.
impl FromSql<Text, Mysql> for *const str
mysql_backend
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
sourcefn from_sql(value: MysqlValue<'_>) -> Result<Self>
fn from_sql(value: MysqlValue<'_>) -> Result<Self>
sourceimpl FromSql<Text, Pg> for *const str
Available on crate feature postgres_backend
only.
impl FromSql<Text, Pg> for *const str
postgres_backend
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
sourceimpl FromSql<Text, Sqlite> for *const str
Available on crate feature sqlite
only.
impl FromSql<Text, Sqlite> for *const str
sqlite
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
sourcefn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
sourceimpl HasSqlType<Text> for Mysql
impl HasSqlType<Text> for Mysql
sourceimpl HasSqlType<Text> for Pg
impl HasSqlType<Text> for Pg
sourcefn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
sourceimpl HasSqlType<Text> for Sqlite
impl HasSqlType<Text> for Sqlite
sourcefn metadata(_: &mut ()) -> SqliteType
fn metadata(_: &mut ()) -> SqliteType
sourceimpl QueryId for Text
impl QueryId for Text
sourceconst HAS_STATIC_QUERY_ID: bool = true
const HAS_STATIC_QUERY_ID: bool = true
Self
be uniquely identified by its type? Read moresourceimpl<'a, DB> ToSql<Text, DB> for MigrationVersion<'a>where
Cow<'a, str>: ToSql<Text, DB>,
DB: Backend,
impl<'a, DB> ToSql<Text, DB> for MigrationVersion<'a>where
Cow<'a, str>: ToSql<Text, DB>,
DB: Backend,
impl Copy for Text
impl SingleValue for Text
impl SqlOrd for Text
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> IntoNotNullable for Twhere
T: SqlType<IsNull = NotNull>,
impl<T> IntoNotNullable for Twhere
T: SqlType<IsNull = NotNull>,
type NotNullable = T
type NotNullable = T
sourceimpl<T> IntoNullable for Twhere
T: SqlType<IsNull = NotNull> + SingleValue,
impl<T> IntoNullable for Twhere
T: SqlType<IsNull = NotNull> + SingleValue,
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> AsExprOf<Self, T>where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> AsExprOf<Self, T>where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
self
to an expression for Diesel’s query builder. Read moresourcefn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
&self
to an expression for Diesel’s query builder. Read more