Skip to main content

ColumnRef

Trait ColumnRef 

Source
pub trait ColumnRef<E: EntityTrait> {
    type Value;

    // Required method
    fn column(&self) -> E::Column;
}
Expand description

A column a query can filter or order by.

Two kinds implement this. The entity’s own Column enum carries Value = sea_orm::Value, so it accepts anything — the escape hatch. #[derive(Model)] also generates a zero-sized type per field whose Value is that field’s actual Rust type, so where_eq(User::team_id, "abc") fails to compile where the enum form would only fail at runtime.

Required Associated Types§

Source

type Value

What this column may be compared against.

Required Methods§

Source

fn column(&self) -> E::Column

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§