pub struct ParadeDbRepository { /* private fields */ }Implementations§
Source§impl ParadeDbRepository
impl ParadeDbRepository
pub async fn create( &self, task: &Task, user_id: i32, ) -> Result<Task, RepositoryError>
pub async fn get(&self, id: Uuid) -> Result<Task, RepositoryError>
pub async fn list(&self, user_id: i32) -> Result<Vec<Task>, RepositoryError>
pub async fn update(&self, task: &Task) -> Result<Task, RepositoryError>
pub async fn delete(&self, id: Uuid) -> Result<(), RepositoryError>
pub async fn search_bm25( &self, user_id: i32, query: &str, limit: i64, ) -> Result<Vec<Task>, RepositoryError>
pub async fn search_vector( &self, user_id: i32, embedding: &[f32], limit: i64, ) -> Result<Vec<(Task, f64)>, RepositoryError>
pub async fn update_embedding( &self, task_id: Uuid, embedding: &[f32], ) -> Result<(), RepositoryError>
pub async fn upsert_user(&self, email: &str) -> Result<i32, RepositoryError>
pub async fn create_session( &self, token: &str, user_id: i32, ) -> Result<(), RepositoryError>
pub async fn validate_session( &self, token: &str, ) -> Result<Option<i32>, RepositoryError>
Auto Trait Implementations§
impl !RefUnwindSafe for ParadeDbRepository
impl !UnwindSafe for ParadeDbRepository
impl Freeze for ParadeDbRepository
impl Send for ParadeDbRepository
impl Sync for ParadeDbRepository
impl Unpin for ParadeDbRepository
impl UnsafeUnpin for ParadeDbRepository
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> 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