[−][src]Trait qualinvest_core::accounts::AccountHandler
Handler for asset depot accounts
Required methods
fn clean_accounts(&mut self) -> Result<(), Error>
Clean database by dropping all tables and than run init
fn init_accounts(&mut self) -> Result<(), Error>
Set up new table for account management
fn insert_account_if_new(
&mut self,
account: &Account
) -> Result<usize, DataError>
&mut self,
account: &Account
) -> Result<usize, DataError>
Insert new account info in database, if it not yet exist
fn get_account_id(&mut self, account: &Account) -> Result<usize, DataError>
Insert new account info in database
fn add_transaction_to_account(
&mut self,
account: usize,
transaction: usize
) -> Result<(), DataError>
&mut self,
account: usize,
transaction: usize
) -> Result<(), DataError>
Add a transaction to the account
fn lookup_hash(&mut self, hash: &str) -> Result<(Vec<usize>, String), DataError>
Check if we have already parsed a given document by look-up its hash If successful, return the transaction ids and the path of the document
fn insert_doc(
&mut self,
transaction_ids: &Vec<usize>,
hash: &str,
path: &str
) -> Result<(), DataError>
&mut self,
transaction_ids: &Vec<usize>,
hash: &str,
path: &str
) -> Result<(), DataError>
Insert document information for successfully parsed documents
fn get_all_transactions_with_account(
&mut self,
account_id: usize
) -> Result<Vec<Transaction>, DataError>
&mut self,
account_id: usize
) -> Result<Vec<Transaction>, DataError>
Get transactions filtered by account id
Implementations on Foreign Types
impl AccountHandler for PostgresDB
[src]
fn clean_accounts(&mut self) -> Result<(), Error>
[src]
Clean database by dropping all tables and than run init
fn init_accounts(&mut self) -> Result<(), Error>
[src]
Set up new table for account management
fn insert_account_if_new(
&mut self,
account: &Account
) -> Result<usize, DataError>
[src]
&mut self,
account: &Account
) -> Result<usize, DataError>
Insert new account info in database
fn get_account_id(&mut self, account: &Account) -> Result<usize, DataError>
[src]
Get ID of given account
fn add_transaction_to_account(
&mut self,
account: usize,
transaction: usize
) -> Result<(), DataError>
[src]
&mut self,
account: usize,
transaction: usize
) -> Result<(), DataError>
Insert transaction to account relation
fn lookup_hash(&mut self, hash: &str) -> Result<(Vec<usize>, String), DataError>
[src]
Insert document information for successfully parsed documents
fn insert_doc(
&mut self,
transaction_ids: &Vec<usize>,
hash: &str,
path: &str
) -> Result<(), DataError>
[src]
&mut self,
transaction_ids: &Vec<usize>,
hash: &str,
path: &str
) -> Result<(), DataError>
Insert document information for successfully parsed documents
fn get_all_transactions_with_account(
&mut self,
account_id: usize
) -> Result<Vec<Transaction>, DataError>
[src]
&mut self,
account_id: usize
) -> Result<Vec<Transaction>, DataError>
Get transactions filtered by account id