pub struct GameDataBase { /* private fields */ }
Expand description
Representation of the PlayOnBSD database that provides a set of methods to query and filter the games.
Implementations§
Source§impl GameDataBase
impl GameDataBase
Source§impl GameDataBase
impl GameDataBase
Sourcepub fn get_all_games(&self) -> QueryResult<&Game>
pub fn get_all_games(&self) -> QueryResult<&Game>
Return all the games of the database
Sourcepub fn get_game_by_id(&self, game_id: u32) -> Option<&Game>
pub fn get_game_by_id(&self, game_id: u32) -> Option<&Game>
Return the game with a given id
Sourcepub fn get_game_by_ids(&self, game_ids: Vec<u32>) -> QueryResult<&Game>
pub fn get_game_by_ids(&self, game_ids: Vec<u32>) -> QueryResult<&Game>
Return the game with the given ids
Sourcepub fn get_game_by_name(&self, name: &str) -> Option<&Game>
pub fn get_game_by_name(&self, name: &str) -> Option<&Game>
Return the game with the given name (case sensitive)
Sourcepub fn get_game_by_tag(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_tag(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_year(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_year(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_engine(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_engine(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_runtime(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_runtime(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_genre(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_genre(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_dev(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_dev(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_publi(&self, field: &str) -> QueryResult<&Game>
pub fn get_game_by_publi(&self, field: &str) -> QueryResult<&Game>
Return the games having the chosen field equal to the given value
Sourcepub fn get_game_by_steam_id(&self, steam_id: usize) -> Option<&Game>
pub fn get_game_by_steam_id(&self, steam_id: usize) -> Option<&Game>
Return the game with the given steam_id (case sensitive)
Sourcepub fn search_game_by_name(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_name(&self, name: &str) -> QueryResult<&Game>
Return the games having the name containing the given value (not case sensitive)
Sourcepub fn search_game_by_year(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_year(&self, name: &str) -> QueryResult<&Game>
Return the games having the given field containing the given value (not case sensitive)
Sourcepub fn search_game_by_engine(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_engine(&self, name: &str) -> QueryResult<&Game>
Return the games having the given field containing the given value (not case sensitive)
Sourcepub fn search_game_by_runtime(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_runtime(&self, name: &str) -> QueryResult<&Game>
Return the games having the given field containing the given value (not case sensitive)
Sourcepub fn search_game_by_dev(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_dev(&self, name: &str) -> QueryResult<&Game>
Return the games having the given field containing the given value (not case sensitive)
Sourcepub fn search_game_by_publi(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_publi(&self, name: &str) -> QueryResult<&Game>
Return the games having the given field containing the given value (not case sensitive)
Sourcepub fn search_game_by_genres(&self, name: &str) -> QueryResult<&Game>
pub fn search_game_by_genres(&self, name: &str) -> QueryResult<&Game>
Return the games having the given field containing the given value (not case sensitive)
Return the games having the given field containing the given value (not case sensitive)
Return all the chosen items of the database
Sourcepub fn get_all_engines(&self) -> QueryResult<&String>
pub fn get_all_engines(&self) -> QueryResult<&String>
Return all the chosen items of the database
Sourcepub fn get_all_runtimes(&self) -> QueryResult<&String>
pub fn get_all_runtimes(&self) -> QueryResult<&String>
Return all the chosen items of the database
Sourcepub fn get_all_genres(&self) -> QueryResult<&String>
pub fn get_all_genres(&self) -> QueryResult<&String>
Return all the chosen items of the database
Sourcepub fn get_all_years(&self) -> QueryResult<&String>
pub fn get_all_years(&self) -> QueryResult<&String>
Return all the chosen items of the database
Sourcepub fn get_all_devs(&self) -> QueryResult<&String>
pub fn get_all_devs(&self) -> QueryResult<&String>
Return all the chosen items of the database
Sourcepub fn get_all_publis(&self) -> QueryResult<&String>
pub fn get_all_publis(&self) -> QueryResult<&String>
Return all the chosen items of the database