Trait DatastoreQueries
Source pub trait DatastoreQueries {
Show 23 methods
// Required methods
fn get_purchase_timestamp(&self, purchase_id: u64) -> Option<i64>;
fn top_user_ids(&self, n: u16) -> Vec<u32>;
fn top_item_ids(&self, user_id: u32, n: u8) -> Vec<u32>;
fn users_searchhit_ids(&self, searchterm: &str) -> Vec<u32>;
fn items_searchhit_ids(&self, searchterm: &str) -> Vec<u32>;
fn personal_log_filtered(
&self,
user_id: u32,
millis_start_inclusive: i64,
millis_end_exclusive: i64,
) -> Vec<Purchase>;
fn global_log_filtered(
&self,
millis_start_inclusive: i64,
millis_end_exclusive: i64,
) -> &[Purchase];
fn bills_filtered(
&self,
user_id: Option<u32>,
millis_start_inclusive: i64,
millis_end_exclusive: i64,
) -> Vec<Bill>;
fn all_categories(&self) -> Vec<String>;
fn get_mut_purchase(&mut self, id: &u64) -> Option<&mut Purchase>;
fn get_bill(&self, timestamp_from: i64, timestamp_to: i64) -> Option<&Bill>;
fn get_mut_bill(
&mut self,
timestamp_from: i64,
timestamp_to: i64,
) -> Option<&mut Bill>;
fn get_specials_to_bill(
&self,
timestamp_from: i64,
timestamp_to: i64,
) -> Vec<u64>;
fn get_unpriced_specials_to_bill(
&self,
timestamp_from: i64,
timestamp_to: i64,
) -> Vec<u64>;
fn get_users_to_bill(
&self,
timestamp_from: i64,
timestamp_to: i64,
) -> Vec<u32>;
fn get_un_set_users_to_bill(
&self,
timestamp_from: i64,
timestamp_to: i64,
) -> Vec<u32>;
fn get_bill_index(
&mut self,
timestamp_from: i64,
timestamp_to: i64,
) -> Option<usize>;
fn get_purchase_indices_to_bill(&self, bill: &Bill) -> Vec<usize>;
fn remove_purchases_indices(&mut self, indices: Vec<usize>);
fn get_ffa_freeby(&self, id: u64) -> Option<&Freeby>;
fn get_personal_freeby(
&self,
recipient_id: u32,
freeby_id: u64,
) -> Option<&Freeby>;
fn get_budget_freeby_id_useable_for(
&self,
recipient_id: u32,
) -> Option<usize>;
fn get_count_freeby_id_useable_for(
&self,
recipient_id: u32,
item: u32,
) -> Option<usize>;
}