pub struct ModelEx {
pub id: LibraryId,
pub directory: PathBytes,
pub last_scan: Option<DateTime<Utc>>,
pub collections: HasMany<Entity>,
pub movies: HasMany<Entity>,
pub shows: HasMany<Entity>,
pub seasons: HasMany<Entity>,
pub episodes: HasMany<Entity>,
}Expand description
The database representation of a library media folder
Fields§
§id: LibraryIdThe library’s ID
directory: PathBytesThe library’s directory
last_scan: Option<DateTime<Utc>>The library’s last scan data
collections: HasMany<Entity>Collections that are part of this library
movies: HasMany<Entity>Movies that are part of this library
shows: HasMany<Entity>Shows that are part of this library
seasons: HasMany<Entity>Seasons that are part of this library
episodes: HasMany<Entity>Episodes that are part of this library
Implementations§
Source§impl ModelEx
impl ModelEx
Sourcepub async fn delete<'a, C>(self, db: &'a C) -> Result<DeleteResult, DbErr>where
C: TransactionTrait,
pub async fn delete<'a, C>(self, db: &'a C) -> Result<DeleteResult, DbErr>where
C: TransactionTrait,
Generated by sea-orm-macros
Trait Implementations§
Source§impl From<ModelEx> for ActiveModelEx
impl From<ModelEx> for ActiveModelEx
Source§impl IntoActiveModel<ActiveModelEx> for ModelEx
impl IntoActiveModel<ActiveModelEx> for ModelEx
Source§fn into_active_model(self) -> ActiveModelEx
fn into_active_model(self) -> ActiveModelEx
Method to call to perform the conversion
Source§impl ModelTrait for ModelEx
impl ModelTrait for ModelEx
type Entity = Entity
Source§fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
Get the Value of a column from a Model
Source§fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
Get the Value Type of a column from the Model
Source§fn try_set(
&mut self,
c: <Self::Entity as EntityTrait>::Column,
v: Value,
) -> Result<(), DbErr>
fn try_set( &mut self, c: <Self::Entity as EntityTrait>::Column, v: Value, ) -> Result<(), DbErr>
Set the Value of a Model field, return error if failed
Source§fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
Set the Value of a Model field, panic if failed
Find related Models belonging to self
Source§fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>
fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>
Find linked Models belonging to self
Source§fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
Delete a model
Source§fn get_primary_key_value(&self) -> ValueTuple
fn get_primary_key_value(&self) -> ValueTuple
Get the primary key value of the Model
Source§impl TryFrom<ActiveModelEx> for ModelEx
impl TryFrom<ActiveModelEx> for ModelEx
Source§impl TryIntoModel<ModelEx> for ActiveModelEx
impl TryIntoModel<ModelEx> for ActiveModelEx
Auto Trait Implementations§
impl Freeze for ModelEx
impl RefUnwindSafe for ModelEx
impl Send for ModelEx
impl Sync for ModelEx
impl Unpin for ModelEx
impl UnwindSafe for ModelEx
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
Source§fn try_into_model(self) -> Result<M, DbErr>
fn try_into_model(self) -> Result<M, DbErr>
Method to call to perform the conversion