pub struct SqliteObjectSpace { /* private fields */ }Expand description
A unit of work over a SqliteDatabase. A commit is one transaction.
Trait Implementations§
Source§impl Debug for SqliteObjectSpace
impl Debug for SqliteObjectSpace
Source§impl ObjectSpace for SqliteObjectSpace
impl ObjectSpace for SqliteObjectSpace
Source§fn entities(&self) -> Vec<EntityInfo>
fn entities(&self) -> Vec<EntityInfo>
The entities it knows.
Source§fn find(&self, name: &str, key: &Value) -> Result<Option<Object>, SpaceError>
fn find(&self, name: &str, key: &Value) -> Result<Option<Object>, SpaceError>
Reads one record by its key.
Source§fn new_object(&mut self, name: &str) -> Result<Object, SpaceError>
fn new_object(&mut self, name: &str) -> Result<Object, SpaceError>
A record with what a new one starts with, kept only once
saved.Source§fn save(&mut self, object: Object) -> Result<(), SpaceError>
fn save(&mut self, object: Object) -> Result<(), SpaceError>
Marks a record as new or changed, by its key.
Source§fn insert(&mut self, object: Object) -> Result<(), SpaceError>
fn insert(&mut self, object: Object) -> Result<(), SpaceError>
Marks a record as new, refusing a key already in use, as a form creating
a record has to: it must not take over the record with that key.
Source§fn delete(&mut self, name: &str, key: &Value) -> Result<(), SpaceError>
fn delete(&mut self, name: &str, key: &Value) -> Result<(), SpaceError>
Marks a record to go away.
Source§fn on_event(&mut self, watcher: SpaceWatcher)
fn on_event(&mut self, watcher: SpaceWatcher)
Calls this when something happens to the space.
Source§fn is_modified(&self) -> bool
fn is_modified(&self) -> bool
Whether anything waits for a commit.
Auto Trait Implementations§
impl !Freeze for SqliteObjectSpace
impl !RefUnwindSafe for SqliteObjectSpace
impl !Send for SqliteObjectSpace
impl !Sync for SqliteObjectSpace
impl !UnwindSafe for SqliteObjectSpace
impl Unpin for SqliteObjectSpace
impl UnsafeUnpin for SqliteObjectSpace
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
Source§impl<S> ObjectSpaceExt for Swhere
S: ObjectSpace + ?Sized,
impl<S> ObjectSpaceExt for Swhere
S: ObjectSpace + ?Sized,
Source§fn add<T>(&mut self, record: &T) -> Result<(), SpaceError>where
T: BusinessObject,
fn add<T>(&mut self, record: &T) -> Result<(), SpaceError>where
T: BusinessObject,
Marks this as a new record. A numbered key left at zero gets the next number.
Source§fn read<T>(&self, query: &Query) -> Result<Vec<T>, SpaceError>where
T: BusinessObject,
fn read<T>(&self, query: &Query) -> Result<Vec<T>, SpaceError>where
T: BusinessObject,
Reads records.