pub struct ProjectQueries;Implementations§
Source§impl ProjectQueries
impl ProjectQueries
pub fn create(conn: &Connection, project: &Project) -> Result<i64>
pub fn find_by_path( conn: &Connection, path: &PathBuf, ) -> Result<Option<Project>>
pub fn list_all( conn: &Connection, include_archived: bool, ) -> Result<Vec<Project>>
pub fn find_by_id(conn: &Connection, project_id: i64) -> Result<Option<Project>>
pub fn find_by_name(conn: &Connection, name: &str) -> Result<Option<Project>>
pub fn archive_project(conn: &Connection, project_id: i64) -> Result<bool>
pub fn unarchive_project(conn: &Connection, project_id: i64) -> Result<bool>
pub fn update_project_path( conn: &Connection, project_id: i64, new_path: &PathBuf, ) -> Result<bool>
pub fn update_project_description( conn: &Connection, project_id: i64, description: Option<String>, ) -> Result<bool>
pub fn delete_project(conn: &Connection, project_id: i64) -> Result<bool>
pub fn get_project_stats( conn: &Connection, project_id: i64, ) -> Result<Option<(i64, i64, i64)>>
pub fn update_name( conn: &Connection, project_id: i64, name: String, ) -> Result<bool>
pub fn update_archived( conn: &Connection, project_id: i64, archived: bool, ) -> Result<bool>
pub fn list_recent_with_stats( conn: &Connection, limit: usize, ) -> Result<Vec<(Project, i64, i64, Option<DateTime<Utc>>)>>
Auto Trait Implementations§
impl Freeze for ProjectQueries
impl RefUnwindSafe for ProjectQueries
impl Send for ProjectQueries
impl Sync for ProjectQueries
impl Unpin for ProjectQueries
impl UnsafeUnpin for ProjectQueries
impl UnwindSafe for ProjectQueries
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> 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