SQLTable

Trait SQLTable 

Source
pub trait SQLTable<'a, Type, Value>:
    SQLSchema<'a, Type, Value>
    + SQLTableInfo
    + Default
    + Clone
where Type: SQLSchemaType, Value: SQLParam + 'a,
{ type Select: SQLModel<'a, Value> + SQLPartial<'a, Value> + Default + 'a; type Insert<T>: SQLModel<'a, Value> + Default; type Update: SQLModel<'a, Value> + Default + 'a; type Aliased: SQLTable<'a, Type, Value>; // Required method fn alias(name: &'static str) -> Self::Aliased; }

Required Associated Types§

Source

type Select: SQLModel<'a, Value> + SQLPartial<'a, Value> + Default + 'a

Source

type Insert<T>: SQLModel<'a, Value> + Default

The type representing a model for INSERT operations on this table. Uses PhantomData with tuple markers to track which fields are set

Source

type Update: SQLModel<'a, Value> + Default + 'a

The type representing a model for UPDATE operations on this table. This would be generated by the table macro.

Source

type Aliased: SQLTable<'a, Type, Value>

The aliased version of this table for self-joins and CTEs. For a table Users, this would be AliasedUsers.

Required Methods§

Source

fn alias(name: &'static str) -> Self::Aliased

Creates an aliased version of this table with the given name. Used for self-joins and CTEs.

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§