[−][src]Trait ergol::ToTable
Any type that should be transformed into a table should implement this trait.
You should not implement this trait yourself, and use the #ergol macro to implement this trait for your structs.
Required methods
pub fn from_row(row: Row) -> Self
[src]
Converts a row of a table into an object.
pub fn table_name() -> &'static str
[src]
Returns the name of the table corresponding to Self.
pub fn id_name() -> &'static str
[src]
Returns the name of the primary key of the table corresponding to Self.
pub fn id(&self) -> i32
[src]
Returns the id of self.
pub fn create_table() -> CreateTable
[src]
Returns the query that creates the table.
pub fn drop_table() -> DropTable
[src]
Returns the query that drops the table.
pub fn select() -> Select<Self>
[src]
Returns a select query.