Struct barrel::table::Table
[−]
[src]
pub struct Table<T: DatabaseGenerator + TableGenerator + Default>(_, _, _);
Methods
impl<T: DatabaseGenerator + TableGenerator + Default> Table<T>
[src]
fn new(name: &str) -> Self
[src]
Create a new table with a name and a generic backend
fn get_name(&self) -> &String
[src]
Helper function which gets the table name
fn exec(&self) -> String
[src]
Concatinate the table contents
fn drop_column(&mut self, _: &str)
[src]
Drop an existing column from the table
fn rename_column(&mut self, _: &str, _: &str)
[src]
Rename an existing column
fn increments(&mut self)
[src]
Adds a primary key called id, that auto increments
fn integer(&mut self, name: &str)
[src]
Add an integer column
fn text(&mut self, name: &str)
[src]
Add a text column
fn string(&mut self, name: &str)
[src]
Add a string column
fn timestamp(&mut self, name: &str)
[src]
Add a timestamp column
Trait Implementations
impl<T: Clone + DatabaseGenerator + TableGenerator + Default> Clone for Table<T>
[src]
fn clone(&self) -> Table<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq + DatabaseGenerator + TableGenerator + Default> PartialEq for Table<T>
[src]
fn eq(&self, __arg_0: &Table<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Table<T>) -> bool
[src]
This method tests for !=
.