pub(super) struct SqlAssignmentRepository<'a> {
pool: &'a PgPool,
batch_size: i64,
}Fields§
§pool: &'a PgPool§batch_size: i64Implementations§
Source§impl<'a> SqlAssignmentRepository<'a>
impl<'a> SqlAssignmentRepository<'a>
pub(super) fn new(pool: &'a PgPool, batch_size: i64) -> Self
async fn query_pending_jobs(&self) -> Result<Vec<PendingJob>, Error>
async fn update_running(&self, job_id: Uuid) -> Result<u64, Error>
async fn query_online_nodes(&self) -> Result<Vec<OnlineNode>, Error>
async fn query_permissions( &self, public_keys: &[NodePublicKey], ) -> Result<Vec<NodePermission>, Error>
async fn query_user_discord_ids( &self, user_ids: &[Uuid], ) -> Result<FastMap<Uuid, String>, Error>
async fn query_friend_memberships( &self, user_ids: &[Uuid], ) -> Result<FastMap<Uuid, Vec<Uuid>>, Error>
Trait Implementations§
Source§impl AssignmentRepository for SqlAssignmentRepository<'_>
impl AssignmentRepository for SqlAssignmentRepository<'_>
fn pending_jobs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingJob>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_running<'life0, 'async_trait>(
&'life0 self,
job_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn online_nodes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<OnlineNode>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
public_keys: &'life1 [NodePublicKey],
) -> Pin<Box<dyn Future<Output = Result<Vec<NodePermission>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn user_discord_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
user_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<FastMap<Uuid, String>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn friend_memberships<'life0, 'life1, 'async_trait>(
&'life0 self,
user_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<FastMap<Uuid, Vec<Uuid>>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<'a> Freeze for SqlAssignmentRepository<'a>
impl<'a> !RefUnwindSafe for SqlAssignmentRepository<'a>
impl<'a> Send for SqlAssignmentRepository<'a>
impl<'a> Sync for SqlAssignmentRepository<'a>
impl<'a> Unpin for SqlAssignmentRepository<'a>
impl<'a> UnsafeUnpin for SqlAssignmentRepository<'a>
impl<'a> !UnwindSafe for SqlAssignmentRepository<'a>
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> 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