Trait ModelTableField

Source
pub trait ModelTableField<DB>
where DB: Database,
{ // Required methods fn table_pk() -> TableFields; fn table_column() -> TableFields; fn query_sqlx_bind<'t>( &'t self, table_field_val: &FieldItem, res: Query<'t, DB, <DB as HasArguments<'t>>::Arguments>, ) -> Query<'t, DB, <DB as HasArguments<'t>>::Arguments>; fn query_as_sqlx_bind<'t, M>( &'t self, table_field_val: &FieldItem, res: QueryAs<'t, DB, M, <DB as HasArguments<'t>>::Arguments>, ) -> QueryAs<'t, DB, M, <DB as HasArguments<'t>>::Arguments> where for<'r> M: FromRow<'r, DB::Row> + Send + Unpin; }
Expand description

model实现得到表字段和字段值绑定 trait

Required Methods§

Source

fn table_pk() -> TableFields

Source

fn table_column() -> TableFields

Source

fn query_sqlx_bind<'t>( &'t self, table_field_val: &FieldItem, res: Query<'t, DB, <DB as HasArguments<'t>>::Arguments>, ) -> Query<'t, DB, <DB as HasArguments<'t>>::Arguments>

Source

fn query_as_sqlx_bind<'t, M>( &'t self, table_field_val: &FieldItem, res: QueryAs<'t, DB, M, <DB as HasArguments<'t>>::Arguments>, ) -> QueryAs<'t, DB, M, <DB as HasArguments<'t>>::Arguments>
where for<'r> M: FromRow<'r, DB::Row> + Send + Unpin,

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§