Iden

Trait Iden 

Source
pub trait Iden {
    // Required method
    fn unquoted(&self) -> &str;

    // Provided methods
    fn quoted(&self) -> Cow<'static, str> { ... }
    fn to_string(&self) -> String { ... }
}
Expand description

Identifier

Required Methodsยง

Source

fn unquoted(&self) -> &str

Write a raw identifier string without quotes.

We intentionally donโ€™t reuse Display for this, because we want to allow it to have a different logic.

Provided Methodsยง

Source

fn quoted(&self) -> Cow<'static, str>

Return the to-be sanitized version of the identifier.

For example, for MySQL โ€œhelloโ€ would have to be escaped as โ€œhel``loโ€. Note that this method doesnโ€™t do the actual escape, as itโ€™s backend specific. It only indicates whether the identifier needs to be escaped.

If the identifier doesnโ€™t need to be escaped, return 'static str. This can be deduced at compile-time by the Iden macro, or using the is_static_iden function.

Cow::Owned would always be escaped.

Source

fn to_string(&self) -> String

A shortcut for writing an unquoted identifier into a String.

We canโ€™t reuse ToString for this, because ToString uses the Display representation. But Iden representation is distinct from Display and can be different.

Implementations on Foreign Typesยง

Sourceยง

impl Iden for &'static str

Sourceยง

fn quoted(&self) -> Cow<'static, str>

Sourceยง

fn unquoted(&self) -> &str

Sourceยง

impl Iden for Has

Sourceยง

fn quoted(&self) -> Cow<'static, str>

Sourceยง

fn unquoted(&self) -> &str

Implementorsยง

Sourceยง

impl Iden for Identity

Sourceยง

impl Iden for MySqlType

Sourceยง

impl Iden for sea_orm::rbac::entity::permission::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::permission::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::resource::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::resource::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role_hierarchy::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role_hierarchy::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role_permission::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role_permission::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::user_override::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::user_override::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::user_role::Column

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::user_role::PrimaryKey

Available on crate feature rbac only.
Sourceยง

impl Iden for PgLTree

Sourceยง

impl Iden for Alias

Sourceยง

impl Iden for NullAlias

Sourceยง

impl Iden for SelectA

Sourceยง

impl Iden for SelectB

Sourceยง

impl Iden for SelectC

Sourceยง

impl Iden for sea_orm::rbac::entity::permission::Entity

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::resource::Entity

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role::Entity

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role_hierarchy::Entity

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::role_permission::Entity

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::user_override::Entity

Available on crate feature rbac only.
Sourceยง

impl Iden for sea_orm::rbac::entity::user_role::Entity

Available on crate feature rbac only.
Sourceยง

impl<E: EntityTrait> Iden for BoolColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for BytesColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for DateLikeColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for DateTimeLikeColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for GenericArrayColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for IpNetworkColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for JsonColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for NumericArrayColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for NumericColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for NumericColumnNullable<E>

Sourceยง

impl<E: EntityTrait> Iden for StringColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for StringColumnNullable<E>

Sourceยง

impl<E: EntityTrait> Iden for TimeLikeColumn<E>

Sourceยง

impl<E: EntityTrait> Iden for UuidColumn<E>