pub struct PostgresJournalEntryRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl JournalEntryRepository for PostgresJournalEntryRepository
impl JournalEntryRepository for PostgresJournalEntryRepository
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 JournalEntry,
) -> Pin<Box<dyn Future<Output = Result<JournalEntry, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 JournalEntry,
) -> Pin<Box<dyn Future<Output = Result<JournalEntry, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new journal entry with its lines Read more
Source§fn find_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all journal entries for an organization Read more
Source§fn find_by_expense<'life0, 'async_trait>(
&'life0 self,
expense_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_expense<'life0, 'async_trait>(
&'life0 self,
expense_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find journal entries linked to a specific expense Read more
Source§fn find_by_date_range<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
start_date: DateTime<Utc>,
end_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_date_range<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
start_date: DateTime<Utc>,
end_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find journal entries for a date range Read more
Source§fn calculate_account_balances<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn calculate_account_balances<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculate account balances from journal entry lines Read more
Source§fn calculate_account_balances_for_period<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
start_date: DateTime<Utc>,
end_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn calculate_account_balances_for_period<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
start_date: DateTime<Utc>,
end_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculate account balances for a specific period Read more
Source§fn find_lines_by_account<'life0, 'life1, 'async_trait>(
&'life0 self,
organization_id: Uuid,
account_code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntryLine>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_lines_by_account<'life0, 'life1, 'async_trait>(
&'life0 self,
organization_id: Uuid,
account_code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntryLine>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all journal entry lines for an account Read more
Source§fn validate_balance<'life0, 'async_trait>(
&'life0 self,
entry_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_balance<'life0, 'async_trait>(
&'life0 self,
entry_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate that an entry is balanced (debits = credits) Read more
Source§fn calculate_account_balances_for_building<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn calculate_account_balances_for_building<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculate account balances for a specific building Read more
Source§fn calculate_account_balances_for_building_and_period<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
building_id: Uuid,
start_date: DateTime<Utc>,
end_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn calculate_account_balances_for_building_and_period<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
building_id: Uuid,
start_date: DateTime<Utc>,
end_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, f64>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculate account balances for a specific building and period
Source§fn create_manual_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry: &'life1 JournalEntry,
lines: &'life2 [JournalEntryLine],
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_manual_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry: &'life1 JournalEntry,
lines: &'life2 [JournalEntryLine],
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a manual journal entry with multiple lines
Source§fn list_entries<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
building_id: Option<Uuid>,
journal_type: Option<String>,
start_date: Option<DateTime<Utc>>,
end_date: Option<DateTime<Utc>>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_entries<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
building_id: Option<Uuid>,
journal_type: Option<String>,
start_date: Option<DateTime<Utc>>,
end_date: Option<DateTime<Utc>>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<JournalEntry>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List journal entries with filters
Source§fn find_by_id<'life0, 'async_trait>(
&'life0 self,
entry_id: Uuid,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<JournalEntry, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
entry_id: Uuid,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<JournalEntry, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find a journal entry by ID
Auto Trait Implementations§
impl Freeze for PostgresJournalEntryRepository
impl !RefUnwindSafe for PostgresJournalEntryRepository
impl Send for PostgresJournalEntryRepository
impl Sync for PostgresJournalEntryRepository
impl Unpin for PostgresJournalEntryRepository
impl !UnwindSafe for PostgresJournalEntryRepository
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> Chain<T> for T
impl<T> Chain<T> for T
§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.