destroy

Macro destroy 

Source
macro_rules! destroy {
    ($teil_deriver:ty) => { ... };
    ($($teil_deriver:ty),+) => { ... };
}
Expand description

Eliminates all the tables created by the structs that derived from the Teil trait.

use teil::Teil;

#[derive(Teil)]
struct User {
    #[teil(primary_key)]
    name: String
}
 
teil::create!(User);
// Do something with the User struct
teil::destroy!(User);

The macro receives a comma-separated list of types, executing tue destroy script for each one. The macro also returns a Result<T,E> with T = () and E = Error