pub struct MapCollaborator {
pub map_id: i64,
pub user_id: Uuid,
pub created_at: NaiveDateTime,
}Expand description
The MapCollaborator entity.
Fields§
§map_id: i64§user_id: Uuid§created_at: NaiveDateTimeImplementations§
Source§impl MapCollaborator
impl MapCollaborator
Sourcepub async fn create(
map_and_collaborator: (i64, NewMapCollaboratorDto),
conn: &mut AsyncPgConnection,
) -> QueryResult<Self>
pub async fn create( map_and_collaborator: (i64, NewMapCollaboratorDto), conn: &mut AsyncPgConnection, ) -> QueryResult<Self>
Sourcepub async fn find_by_map_id(
map_id: i64,
conn: &mut AsyncPgConnection,
) -> QueryResult<Vec<Self>>
pub async fn find_by_map_id( map_id: i64, conn: &mut AsyncPgConnection, ) -> QueryResult<Vec<Self>>
Sourcepub async fn find_by_user_id(
user_id: Uuid,
conn: &mut AsyncPgConnection,
) -> QueryResult<Vec<i64>>
pub async fn find_by_user_id( user_id: Uuid, conn: &mut AsyncPgConnection, ) -> QueryResult<Vec<i64>>
Sourcepub async fn delete(
map_and_dto: (i64, DeleteMapCollaboratorDto),
conn: &mut AsyncPgConnection,
) -> QueryResult<()>
pub async fn delete( map_and_dto: (i64, DeleteMapCollaboratorDto), conn: &mut AsyncPgConnection, ) -> QueryResult<()>
Trait Implementations§
Source§impl From<(i64, NewMapCollaboratorDto)> for MapCollaborator
impl From<(i64, NewMapCollaboratorDto)> for MapCollaborator
Source§fn from(map_and_collaborator: (i64, NewMapCollaboratorDto)) -> Self
fn from(map_and_collaborator: (i64, NewMapCollaboratorDto)) -> Self
Converts to this type from the input type.
Source§impl HasTable for MapCollaborator
impl HasTable for MapCollaborator
Source§impl<'ident> Identifiable for &'ident MapCollaborator
impl<'ident> Identifiable for &'ident MapCollaborator
Source§impl<'insert> Insertable<table> for &'insert MapCollaborator
impl<'insert> Insertable<table> for &'insert MapCollaborator
Source§type Values = <(Option<Grouped<Eq<map_id, <&'insert i64 as AsExpression<<map_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <&'insert Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert NaiveDateTime as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<map_id, <&'insert i64 as AsExpression<<map_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <&'insert Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert NaiveDateTime 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<map_id, &'insert i64>>, Option<Eq<user_id, &'insert Uuid>>, Option<Eq<created_at, &'insert NaiveDateTime>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<map_id, &'insert i64>>, Option<Eq<user_id, &'insert Uuid>>, Option<Eq<created_at, &'insert NaiveDateTime>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl Insertable<table> for MapCollaborator
impl Insertable<table> for MapCollaborator
Source§type Values = <(Option<Grouped<Eq<map_id, <i64 as AsExpression<<map_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <NaiveDateTime as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<map_id, <i64 as AsExpression<<map_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <NaiveDateTime 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<map_id, i64>>, Option<Eq<user_id, Uuid>>, Option<Eq<created_at, NaiveDateTime>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<map_id, i64>>, Option<Eq<user_id, Uuid>>, Option<Eq<created_at, NaiveDateTime>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for MapCollaborator
impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for MapCollaborator
impl UndecoratedInsertRecord<table> for MapCollaborator
Auto Trait Implementations§
impl Freeze for MapCollaborator
impl RefUnwindSafe for MapCollaborator
impl Send for MapCollaborator
impl Sync for MapCollaborator
impl Unpin for MapCollaborator
impl UnwindSafe for MapCollaborator
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>where
Conn: AsyncConnection + Send,
Self: ExecuteDsl<Conn> + 'query,
fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>where
Conn: AsyncConnection + Send,
Self: ExecuteDsl<Conn> + 'query,
Executes the given command, returning the number of rows affected. Read more
§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Executes the given query, returning a [
Stream] with the returned rows. Read more§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>where
U: Send + 'conn,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>where
U: Send + 'conn,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
Runs the command, and returns the affected row. Read more
§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
Runs the command, returning an
Vec with the affected rows. Read more§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
Attempts to load a single record. Read more
§impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
§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.