pub struct ActiveModelEx {
pub id: ActiveValue<CollectionId>,
pub parent_id: ActiveValue<Option<CollectionId>>,
pub library_id: ActiveValue<LibraryId>,
pub directory: ActiveValue<PathBytes>,
pub relative_poster_path: ActiveValue<Option<String>>,
pub parent: HasOneModel<Entity>,
pub library: HasOneModel<Entity>,
pub info: HasOneModel<Entity>,
pub watched: HasManyModel<Entity>,
}Expand description
Generated by sea-orm-macros
Fields§
§id: ActiveValue<CollectionId>Generated by sea-orm-macros
parent_id: ActiveValue<Option<CollectionId>>Generated by sea-orm-macros
library_id: ActiveValue<LibraryId>Generated by sea-orm-macros
directory: ActiveValue<PathBytes>Generated by sea-orm-macros
relative_poster_path: ActiveValue<Option<String>>Generated by sea-orm-macros
parent: HasOneModel<Entity>Generated by sea-orm-macros
library: HasOneModel<Entity>Generated by sea-orm-macros
info: HasOneModel<Entity>Generated by sea-orm-macros
watched: HasManyModel<Entity>Generated by sea-orm-macros
Implementations§
Source§impl ActiveModelEx
impl ActiveModelEx
Sourcepub async fn insert<'a, C>(self, db: &'a C) -> Result<ModelEx, DbErr>where
C: TransactionTrait,
pub async fn insert<'a, C>(self, db: &'a C) -> Result<ModelEx, DbErr>where
C: TransactionTrait,
Generated by sea-orm-macros
Sourcepub async fn update<'a, C>(self, db: &'a C) -> Result<ModelEx, DbErr>where
C: TransactionTrait,
pub async fn update<'a, C>(self, db: &'a C) -> Result<ModelEx, DbErr>where
C: TransactionTrait,
Generated by sea-orm-macros
Sourcepub async fn save<'a, C>(self, db: &'a C) -> Result<Self, DbErr>where
C: TransactionTrait,
pub async fn save<'a, C>(self, db: &'a C) -> Result<Self, DbErr>where
C: TransactionTrait,
Generated by sea-orm-macros
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
Sourcepub async fn action<'a, C>(
self,
action: ActiveModelAction,
db: &'a C,
) -> Result<Self, DbErr>where
C: TransactionTrait,
pub async fn action<'a, C>(
self,
action: ActiveModelAction,
db: &'a C,
) -> Result<Self, DbErr>where
C: TransactionTrait,
Generated by sea-orm-macros
Sourcepub fn set_id(self, v: impl Into<CollectionId>) -> Self
pub fn set_id(self, v: impl Into<CollectionId>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_parent_id(self, v: impl Into<Option<CollectionId>>) -> Self
pub fn set_parent_id(self, v: impl Into<Option<CollectionId>>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_library_id(self, v: impl Into<LibraryId>) -> Self
pub fn set_library_id(self, v: impl Into<LibraryId>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_directory(self, v: impl Into<PathBytes>) -> Self
pub fn set_directory(self, v: impl Into<PathBytes>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_relative_poster_path(self, v: impl Into<Option<String>>) -> Self
pub fn set_relative_poster_path(self, v: impl Into<Option<String>>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_parent(self, v: impl Into<ActiveModelEx>) -> Self
pub fn set_parent(self, v: impl Into<ActiveModelEx>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_library(self, v: impl Into<ActiveModelEx>) -> Self
pub fn set_library(self, v: impl Into<ActiveModelEx>) -> Self
Generated by sea-orm-macros
Sourcepub fn set_info(self, v: impl Into<ActiveModelEx>) -> Self
pub fn set_info(self, v: impl Into<ActiveModelEx>) -> Self
Generated by sea-orm-macros
Sourcepub fn add_watched(self, v: impl Into<ActiveModelEx>) -> Self
pub fn add_watched(self, v: impl Into<ActiveModelEx>) -> Self
Generated by sea-orm-macros
Trait Implementations§
Source§impl ActiveModelTrait for ActiveModelEx
impl ActiveModelTrait for ActiveModelEx
Source§fn is_changed(&self) -> bool
fn is_changed(&self) -> bool
Returns true if any field is set or changed. This is recursive.
Source§fn take(
&mut self,
c: <Self::Entity as EntityTrait>::Column,
) -> ActiveValue<Value>
fn take( &mut self, c: <Self::Entity as EntityTrait>::Column, ) -> ActiveValue<Value>
Get a mutable ActiveValue from an ActiveModel
Source§fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> ActiveValue<Value>
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> ActiveValue<Value>
Get a immutable ActiveValue from an ActiveModel
Source§fn set_if_not_equals(
&mut self,
c: <Self::Entity as EntityTrait>::Column,
v: Value,
)
fn set_if_not_equals( &mut self, c: <Self::Entity as EntityTrait>::Column, v: Value, )
Set the Value of a ActiveModel field if value is different, panic if failed
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 ActiveModel field, return error if failed
Source§fn not_set(&mut self, c: <Self::Entity as EntityTrait>::Column)
fn not_set(&mut self, c: <Self::Entity as EntityTrait>::Column)
Set the state of an ActiveValue to the not set state
Source§fn is_not_set(&self, c: <Self::Entity as EntityTrait>::Column) -> bool
fn is_not_set(&self, c: <Self::Entity as EntityTrait>::Column) -> bool
Check the state of a ActiveValue
Source§fn reset(&mut self, c: <Self::Entity as EntityTrait>::Column)
fn reset(&mut self, c: <Self::Entity as EntityTrait>::Column)
Reset the value from ActiveValue::Unchanged to ActiveValue::Set,
leaving ActiveValue::NotSet untouched.
Source§fn default_values() -> Self
fn default_values() -> Self
Create an ActiveModel with all fields to Set(default_value) if Default is implemented, NotSet otherwise
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 ActiveModel field, panic if failed
Source§fn reset_all(self) -> Self
fn reset_all(self) -> Self
Reset all values from ActiveValue::Unchanged to ActiveValue::Set,
leaving ActiveValue::NotSet untouched.
Source§fn get_primary_key_value(&self) -> Option<ValueTuple>
fn get_primary_key_value(&self) -> Option<ValueTuple>
Get the primary key of the ActiveModel, only if it’s fully specified.
Find related Models belonging to self
Source§impl Clone for ActiveModelEx
impl Clone for ActiveModelEx
Source§fn clone(&self) -> ActiveModelEx
fn clone(&self) -> ActiveModelEx
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActiveModelEx
impl Debug for ActiveModelEx
Source§impl Default for ActiveModelEx
impl Default for ActiveModelEx
Source§impl From<ActiveModel> for ActiveModelEx
impl From<ActiveModel> for ActiveModelEx
Source§fn from(m: ActiveModel) -> Self
fn from(m: ActiveModel) -> Self
Converts to this type from the input type.
Source§impl From<ActiveModelEx> for ActiveModel
impl From<ActiveModelEx> for ActiveModel
Source§fn from(m: ActiveModelEx) -> Self
fn from(m: ActiveModelEx) -> Self
Converts to this type from the input type.
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 PartialEq for ActiveModelEx
impl PartialEq for ActiveModelEx
Source§impl TryFrom<ActiveModelEx> for ModelEx
impl TryFrom<ActiveModelEx> for ModelEx
Source§impl TryIntoModel<ModelEx> for ActiveModelEx
impl TryIntoModel<ModelEx> for ActiveModelEx
impl StructuralPartialEq for ActiveModelEx
Auto Trait Implementations§
impl Freeze for ActiveModelEx
impl RefUnwindSafe for ActiveModelEx
impl Send for ActiveModelEx
impl Sync for ActiveModelEx
impl Unpin for ActiveModelEx
impl UnwindSafe for ActiveModelEx
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<A> IntoActiveModel<A> for Awhere
A: ActiveModelTrait,
impl<A> IntoActiveModel<A> for Awhere
A: ActiveModelTrait,
Source§fn into_active_model(self) -> A
fn into_active_model(self) -> A
Method to call to perform the conversion
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 more