Struct libpobsd::db::database::GameDataBase
source · pub struct GameDataBase { /* private fields */ }
Expand description
Queryable representation of the PlayOnBSD database
Implementations§
source§impl GameDataBase
impl GameDataBase
source§impl GameDataBase
impl GameDataBase
sourcepub fn get_game_by_id(&self, game_id: u32) -> Option<&Game>
pub fn get_game_by_id(&self, game_id: u32) -> Option<&Game>
Returns the game with the given id.
sourcepub fn get_game_by_name(
&self,
name: &str,
search_type: &SearchType
) -> Option<&Game>
pub fn get_game_by_name( &self, name: &str, search_type: &SearchType ) -> Option<&Game>
Returns the first game found which names contains the given name.
It can be case sensitive or insensitive depending on the
SearchType
variant.
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>
Returns the game with the given steam_id.
sourcepub fn match_games_by_ids(&self, game_ids: Vec<u32>) -> QueryResult<&Game>
pub fn match_games_by_ids(&self, game_ids: Vec<u32>) -> QueryResult<&Game>
Returns all games matching the given vector of game ids.
sourcepub fn match_games_by_tag(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_tag(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn match_games_by_year(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_year(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn match_games_by_engine(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_engine(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn match_games_by_runtime(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_runtime(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn match_games_by_genre(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_genre(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn match_games_by_dev(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_dev(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn match_games_by_publi(&self, field: &str) -> QueryResult<&Game>
pub fn match_games_by_publi(&self, field: &str) -> QueryResult<&Game>
Returns the games for which the searched field exactly matches the given value.
sourcepub fn search_games_by_name(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_name( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_tag(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_tag( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_year(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_year( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_engine(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_engine( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_runtime(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_runtime( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_genre(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_genre( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_dev(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_dev( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_games_by_publi(
&self,
pattern: &str,
search_type: &SearchType
) -> QueryResult<&Game>
pub fn search_games_by_publi( &self, pattern: &str, search_type: &SearchType ) -> QueryResult<&Game>
Returns the games for which the chosen field contains the given value.
It can be case sensitive or insensitive depending on the
SearchType
variant.
sourcepub fn search_game_by_filter(
&self,
search_type: &SearchType,
filter: &GameFilter
) -> QueryResult<&Game>
pub fn search_game_by_filter( &self, search_type: &SearchType, filter: &GameFilter ) -> QueryResult<&Game>
Returns the games filtered using the GameFilter
.
sourcepub fn get_all_games(&self) -> QueryResult<&Game>
pub fn get_all_games(&self) -> QueryResult<&Game>
Returns all games as a QueryResult.
Returns all the items for the chosen field.
sourcepub fn get_all_engines(&self) -> QueryResult<&Item>
pub fn get_all_engines(&self) -> QueryResult<&Item>
Returns all the items for the chosen field.
sourcepub fn get_all_runtimes(&self) -> QueryResult<&Item>
pub fn get_all_runtimes(&self) -> QueryResult<&Item>
Returns all the items for the chosen field.
sourcepub fn get_all_genres(&self) -> QueryResult<&Item>
pub fn get_all_genres(&self) -> QueryResult<&Item>
Returns all the items for the chosen field.
sourcepub fn get_all_years(&self) -> QueryResult<&Item>
pub fn get_all_years(&self) -> QueryResult<&Item>
Returns all the items for the chosen field.
sourcepub fn get_all_devs(&self) -> QueryResult<&Item>
pub fn get_all_devs(&self) -> QueryResult<&Item>
Returns all the items for the chosen field.
sourcepub fn get_all_publis(&self) -> QueryResult<&Item>
pub fn get_all_publis(&self) -> QueryResult<&Item>
Returns all the items for the chosen field.
Returns all the items for the chosen field as well as the game ids associated to each item.
sourcepub fn get_all_engines_with_ids(&self) -> Vec<(String, Vec<u32>)>
pub fn get_all_engines_with_ids(&self) -> Vec<(String, Vec<u32>)>
Returns all the items for the chosen field as well as the game ids associated to each item.
sourcepub fn get_all_runtimes_with_ids(&self) -> Vec<(String, Vec<u32>)>
pub fn get_all_runtimes_with_ids(&self) -> Vec<(String, Vec<u32>)>
Returns all the items for the chosen field as well as the game ids associated to each item.
sourcepub fn get_all_genres_with_ids(&self) -> Vec<(String, Vec<u32>)>
pub fn get_all_genres_with_ids(&self) -> Vec<(String, Vec<u32>)>
Returns all the items for the chosen field as well as the game ids associated to each item.
sourcepub fn get_all_years_with_ids(&self) -> Vec<(String, Vec<u32>)>
pub fn get_all_years_with_ids(&self) -> Vec<(String, Vec<u32>)>
Returns all the items for the chosen field as well as the game ids associated to each item.
Trait Implementations§
source§impl Clone for GameDataBase
impl Clone for GameDataBase
source§fn clone(&self) -> GameDataBase
fn clone(&self) -> GameDataBase
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more