pub struct PostgresBuildingRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl BuildingRepository for PostgresBuildingRepository
impl BuildingRepository for PostgresBuildingRepository
Source§fn find_by_id_with_metrics<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(Building, BuildingMetrics)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_id_with_metrics<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(Building, BuildingMetrics)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Story 1.4 — Building + metrics via LEFT JOIN units agrégé.
SUM(quota::NUMERIC) cast en NUMERIC pour rester Decimal strict (cf.
ADR-0007/0008 + mémoire no-f64-in-money). Lorsqu’aucune unit
n’existe, SUM renvoie NULL côté SQL → COALESCE(..., 0) ramène à
Decimal::ZERO (jamais NaN, jamais panic).
Cluster #433 : la colonne units.quota reste DOUBLE PRECISION côté
schéma (migration territoire 1.2), mais le ::NUMERIC côté SELECT
produit un Decimal exact sur la somme — c’est la cible #433 sur la
frontière infra↔domain pour cette story.
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
building: &'life1 Building,
) -> Pin<Box<dyn Future<Output = Result<Building, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Building>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Building>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn find_all_paginated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
page_request: &'life1 PageRequest,
filters: &'life2 BuildingFilters,
) -> Pin<Box<dyn Future<Output = Result<(Vec<Building>, i64), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_all_paginated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
page_request: &'life1 PageRequest,
filters: &'life2 BuildingFilters,
) -> Pin<Box<dyn Future<Output = Result<(Vec<Building>, i64), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find all buildings with pagination and filters
Returns tuple of (buildings, total_count)
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
building: &'life1 Building,
) -> Pin<Box<dyn Future<Output = Result<Building, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn find_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Building>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Building>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find building by URL slug (for public pages - Issue #92)
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresBuildingRepository
impl !UnwindSafe for PostgresBuildingRepository
impl Freeze for PostgresBuildingRepository
impl Send for PostgresBuildingRepository
impl Sync for PostgresBuildingRepository
impl Unpin for PostgresBuildingRepository
impl UnsafeUnpin for PostgresBuildingRepository
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Fake for T
impl<T> Fake for T
§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 moreCreates a shared type from an unshared type.