pub struct Pool(/* private fields */);Implementations§
Source§impl Pool
impl Pool
pub async fn insert_tasks<I>(
&self,
tasks: I,
params: &TaskParams,
) -> Result<u64>where
I: Iterator<Item = TaskPayload>,
Trait Implementations§
Source§impl AsRef<Pool<Sqlite>> for Pool
impl AsRef<Pool<Sqlite>> for Pool
Source§fn as_ref(&self) -> &SqlitePool
fn as_ref(&self) -> &SqlitePool
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AuthenticationRepository for Pool
impl AuthenticationRepository for Pool
Source§impl MediaRepository for Pool
impl MediaRepository for Pool
Source§impl PodcastEpisodeRepository for Pool
impl PodcastEpisodeRepository for Pool
async fn find_by_id(&self, episode_id: u64) -> Result<Option<PodcastEpisode>>
async fn list<'a>( &self, params: ListPodcastEpisodeParams<'a>, ) -> Result<Vec<PodcastEpisode>>
async fn delete_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<()>
async fn list_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<Vec<PodcastEpisodeProgress>>
async fn upsert_progressions( &self, inputs: &[PodcastEpisodeProgressInput], ) -> Result<Vec<PodcastEpisodeProgress>>
Source§impl PodcastRepository for Pool
impl PodcastRepository for Pool
async fn find_by_id(&self, podcast_id: u64) -> Result<Option<Podcast>>
async fn find_by_feed_url(&self, feed_url: &str) -> Result<Option<Podcast>>
async fn list<'a>(&self, params: ListPodcastParams<'a>) -> Result<Vec<Podcast>>
async fn upsert(&self, entity: &PodcastInput) -> Result<Podcast>
Source§impl PodcastSubscriptionRepository for Pool
impl PodcastSubscriptionRepository for Pool
async fn create(&self, user_id: u64, podcast_id: u64) -> Result<()>
async fn delete(&self, user_id: u64, podcast_id: u64) -> Result<()>
async fn list( &self, user_id: u64, podcast_ids: &[u64], ) -> Result<Vec<PodcastSubscription>>
async fn update( &self, user_id: u64, podcast_id: u64, body: PodcastSubscriptionUpdate, ) -> Result<()>
async fn find( &self, user_id: u64, podcast_id: u64, ) -> Result<Option<PodcastSubscription>>
Source§impl PodcastTaskRepository for Pool
impl PodcastTaskRepository for Pool
Source§impl TaskRepository for Pool
impl TaskRepository for Pool
async fn start_task(&self) -> Result<Option<Task>>
async fn complete_task(&self, task_id: u64) -> Result<()>
async fn fail_task(&self, task_id: u64, error: String) -> Result<()>
async fn find_by_target_ids( &self, task_method: TaskMethod, target_ids: &[u64], ) -> Result<Vec<Task>>
Source§impl TvShowEpisodeFileRepository for Pool
impl TvShowEpisodeFileRepository for Pool
async fn list<'a>( &self, params: ListEpisodeFileParams<'a>, ) -> Result<Vec<TvShowEpisodeFile>>
Source§impl TvShowEpisodeRepository for Pool
impl TvShowEpisodeRepository for Pool
async fn find_by_id( &self, episode_id: u64, language: Language, ) -> Result<Option<TvShowEpisode>>
async fn list<'a>( &self, params: ListTvShowEpisodeParams<'a>, ) -> Result<Vec<TvShowEpisode>>
async fn upsert( &self, tvshow_id: u64, input: &[ExternalTvShowEpisode], ) -> Result<Vec<TvShowEpisode>>
async fn delete_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<()>
async fn list_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<Vec<TvShowEpisodeProgress>>
async fn upsert_progressions( &self, inputs: &[TvShowEpisodeProgressInput], ) -> Result<Vec<TvShowEpisodeProgress>>
Source§impl TvShowRepository for Pool
impl TvShowRepository for Pool
async fn find_by_id( &self, tvshow_id: u64, language: Language, ) -> Result<Option<TvShow>>
async fn find_by_source( &self, source: TvShowSource, language: Language, ) -> Result<Option<TvShow>>
async fn list<'a>(&self, params: ListTvShowParams<'a>) -> Result<Vec<TvShow>>
async fn list_languages( &self, tvshow_ids: &[u64], ) -> Result<Vec<(u64, Language)>>
async fn upsert(&self, input: &ExternalTvShow) -> Result<TvShow>
Source§impl TvShowSeasonRepository for Pool
impl TvShowSeasonRepository for Pool
async fn find_by_id( &self, season_id: u64, language: Language, ) -> Result<Option<TvShowSeason>>
async fn list<'a>( &self, params: ListTvShowSeasonParams<'a>, ) -> Result<Vec<TvShowSeason>>
async fn upsert( &self, tvshow_id: u64, input: &ExternalTvShowSeason, ) -> Result<TvShowSeason>
Source§impl TvShowSubscriptionRepository for Pool
impl TvShowSubscriptionRepository for Pool
async fn list_by_ids( &self, user_id: u64, tvshow_ids: &[u64], ) -> Result<Vec<TvShowSubscription>>
async fn create(&self, user_id: u64, tvshow_id: u64) -> Result<()>
async fn delete(&self, user_id: u64, tvshow_id: u64) -> Result<()>
async fn list( &self, user_id: u64, language: Language, ) -> Result<Vec<TvShowWithSubscription>>
Auto Trait Implementations§
impl Freeze for Pool
impl !RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl !UnwindSafe for Pool
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 more