pub struct DbMetadata {
pub id: i64,
pub media_id: String,
pub origin_server: OwnedServerName,
pub content_type: Option<String>,
pub disposition_type: Option<String>,
pub file_name: Option<String>,
pub file_extension: Option<String>,
pub file_size: i64,
pub file_hash: Option<String>,
pub created_by: Option<OwnedUserId>,
pub created_at: UnixMillis,
}Fields§
§id: i64§media_id: String§origin_server: OwnedServerName§content_type: Option<String>§disposition_type: Option<String>§file_name: Option<String>§file_extension: Option<String>§file_size: i64§file_hash: Option<String>§created_by: Option<OwnedUserId>§created_at: UnixMillisTrait Implementations§
Source§impl Clone for DbMetadata
impl Clone for DbMetadata
Source§fn clone(&self) -> DbMetadata
fn clone(&self) -> DbMetadata
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 DbMetadata
impl Debug for DbMetadata
Source§impl HasTable for DbMetadata
impl HasTable for DbMetadata
Source§impl<'ident> Identifiable for &'ident DbMetadata
impl<'ident> Identifiable for &'ident DbMetadata
Source§impl<'insert> Insertable<table> for &'insert DbMetadata
impl<'insert> Insertable<table> for &'insert DbMetadata
Source§type Values = <(Option<Grouped<Eq<id, <&'insert i64 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<media_id, <&'insert String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <&'insert OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <&'insert String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <&'insert String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <&'insert String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <&'insert String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <&'insert i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <&'insert String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <&'insert OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<id, <&'insert i64 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<media_id, <&'insert String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <&'insert OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <&'insert String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <&'insert String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <&'insert String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <&'insert String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <&'insert i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <&'insert String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <&'insert OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<id, &'insert i64>>, Option<Eq<media_id, &'insert String>>, Option<Eq<origin_server, &'insert OwnedServerName>>, Option<Eq<content_type, &'insert String>>, Option<Eq<disposition_type, &'insert String>>, Option<Eq<file_name, &'insert String>>, Option<Eq<file_extension, &'insert String>>, Option<Eq<file_size, &'insert i64>>, Option<Eq<file_hash, &'insert String>>, Option<Eq<created_by, &'insert OwnedUserId>>, Option<Eq<created_at, &'insert UnixMillis>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<id, &'insert i64>>, Option<Eq<media_id, &'insert String>>, Option<Eq<origin_server, &'insert OwnedServerName>>, Option<Eq<content_type, &'insert String>>, Option<Eq<disposition_type, &'insert String>>, Option<Eq<file_name, &'insert String>>, Option<Eq<file_extension, &'insert String>>, Option<Eq<file_size, &'insert i64>>, Option<Eq<file_hash, &'insert String>>, Option<Eq<created_by, &'insert OwnedUserId>>, Option<Eq<created_at, &'insert UnixMillis>>) as Insertable<table>>::Values
Construct
Self::Values Read moreSource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self into a given table. Read moreSource§impl Insertable<table> for DbMetadata
impl Insertable<table> for DbMetadata
Source§type Values = <(Option<Grouped<Eq<id, <i64 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<media_id, <String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<id, <i64 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<media_id, <String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<id, i64>>, Option<Eq<media_id, String>>, Option<Eq<origin_server, OwnedServerName>>, Option<Eq<content_type, String>>, Option<Eq<disposition_type, String>>, Option<Eq<file_name, String>>, Option<Eq<file_extension, String>>, Option<Eq<file_size, i64>>, Option<Eq<file_hash, String>>, Option<Eq<created_by, OwnedUserId>>, Option<Eq<created_at, UnixMillis>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<id, i64>>, Option<Eq<media_id, String>>, Option<Eq<origin_server, OwnedServerName>>, Option<Eq<content_type, String>>, Option<Eq<disposition_type, String>>, Option<Eq<file_name, String>>, Option<Eq<file_extension, String>>, Option<Eq<file_size, i64>>, Option<Eq<file_hash, String>>, Option<Eq<created_by, OwnedUserId>>, Option<Eq<created_at, UnixMillis>>) as Insertable<table>>::Values
Construct
Self::Values Read moreSource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self into a given table. Read moreSource§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10), __DB> for DbMetadata
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10), __DB> for DbMetadata
impl UndecoratedInsertRecord<table> for DbMetadata
Auto Trait Implementations§
impl Freeze for DbMetadata
impl RefUnwindSafe for DbMetadata
impl Send for DbMetadata
impl Sync for DbMetadata
impl Unpin for DbMetadata
impl UnwindSafe for DbMetadata
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
Source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.