pub struct SqliteBuilder { /* private fields */ }Expand description
Puts a database together, one entity at a time.
Implementations§
Source§impl SqliteBuilder
impl SqliteBuilder
Sourcepub fn mapped(
self,
entity: EntityInfo,
map: TableMap,
) -> Result<Self, ModelError>
pub fn mapped( self, entity: EntityInfo, map: TableMap, ) -> Result<Self, ModelError>
An entity on a table that exists, whose schema is not touched.
Sourcepub fn managed(
self,
entity: EntityInfo,
map: TableMap,
) -> Result<Self, ModelError>
pub fn managed( self, entity: EntityInfo, map: TableMap, ) -> Result<Self, ModelError>
An entity on a table that is created if it is missing.
Sourcepub fn migration(self, id: &str, sql: &str) -> Result<Self, ModelError>
pub fn migration(self, id: &str, sql: &str) -> Result<Self, ModelError>
Runs this once in the life of the database, for what adding a column cannot do, such as renaming one or moving data. A migration that fails leaves everything as it was.
Sourcepub fn build(self) -> SqliteDatabase
pub fn build(self) -> SqliteDatabase
Ready to read and write.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteBuilder
impl !Send for SqliteBuilder
impl !Sync for SqliteBuilder
impl !UnwindSafe for SqliteBuilder
impl Freeze for SqliteBuilder
impl Unpin for SqliteBuilder
impl UnsafeUnpin for SqliteBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more