Trait ColumnDefExt

Source
pub trait ColumnDefExt {
    // Required methods
    fn rw_binary(&mut self, _: &SchemaManager<'_>) -> &mut Self;
    fn rw_long_text(&mut self, _: &SchemaManager<'_>) -> &mut Self;
}

Required Methods§

Source

fn rw_binary(&mut self, _: &SchemaManager<'_>) -> &mut Self

Set column type as longblob for MySQL, bytea for Postgres, and blob for Sqlite.

Should be preferred over binary or blob for large binary fields, typically the fields wrapping protobuf or other serialized data. Otherwise, MySQL will return an error when the length exceeds 65535 bytes.

Source

fn rw_long_text(&mut self, _: &SchemaManager<'_>) -> &mut Self

Set column type as longtext for MySQL, and text for Postgres and Sqlite.

Should be preferred over text or string for large text fields, typically user-specified contents like UDF body or SQL definition. Otherwise, MySQL will return an error when the length exceeds 65535 bytes.

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.

Implementors§