|
| CPVRDatabase ()=default |
| Create a new instance of the PVR database.
|
|
bool | Open () override |
| Open the database. More...
|
|
void | Close () override |
| Close the database.
|
|
void | Lock () |
| Lock the database.
|
|
void | Unlock () |
| Unlock the database.
|
|
int | GetSchemaVersion () const override |
| Get the minimal database version that is required to operate correctly. More...
|
|
const char * | GetBaseDBName () const override |
| Get the default sqlite database filename. More...
|
|
bool | UpdateLastOpened (const CPVRChannelGroup &group) |
| Updates the last opened timestamp for the channel group. More...
|
|
|
bool | DeleteClients () |
| Remove all client entries from the database. More...
|
|
bool | Persist (const CPVRClient &client) |
| Add or update a client entry in the database. More...
|
|
bool | Delete (const CPVRClient &client) |
| Remove a client entry from the database. More...
|
|
int | GetPriority (const CPVRClient &client) |
| Get the priority for a given client from the database. More...
|
|
bool | UpdateLastWatched (const CPVRChannel &channel) |
| Updates the last watched timestamp for the channel. More...
|
|
bool | UpdateLastWatched (const CPVRChannelGroup &group) |
| Updates the last watched timestamp for the channel group. More...
|
|
|
bool | DeleteChannels () |
| Remove all channels from the database. More...
|
|
int | Get (bool bRadio, const std::vector< std::shared_ptr< CPVRClient >> &clients, std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel >> &results) const |
| Get channels from the database. More...
|
|
bool | Persist (CPVRChannel &channel, bool bCommit) |
| Add or update a channel entry in the database. More...
|
|
bool | QueueDeleteQuery (const CPVRChannel &channel) |
| Remove a channel entry from the database. More...
|
|
|
bool | QueueDeleteQuery (const CPVRChannelGroupMember &groupMember) |
| Remove a channel group member entry from the database. More...
|
|
|
bool | DeleteProviders () |
| Remove all providers from the database. More...
|
|
bool | Persist (CPVRProvider &provider, bool updateRecord=false) |
| Add or update a provider entry in the database. More...
|
|
bool | Delete (const CPVRProvider &provider) |
| Remove a provider entry from the database. More...
|
|
bool | Get (CPVRProviders &results, const std::vector< std::shared_ptr< CPVRClient >> &clients) const |
| Get the list of providers from the database. More...
|
|
int | GetMaxProviderId () |
| Get the maximum provider id in the database. More...
|
|
|
bool | DeleteChannelGroups () |
| Remove all channel groups from the database. More...
|
|
bool | Delete (const CPVRChannelGroup &group) |
| Delete a channel group and all its members from the database. More...
|
|
int | Get (CPVRChannelGroups &results) const |
| Get the channel groups. More...
|
|
std::vector< std::shared_ptr< CPVRChannelGroupMember > > | Get (const CPVRChannelGroup &group, const std::vector< std::shared_ptr< CPVRClient >> &clients) const |
| Get the members of a channel group. More...
|
|
bool | Persist (CPVRChannelGroup &group) |
| Add or update a channel group entry in the database. More...
|
|
bool | ResetEPG () |
| Reset all epg ids to 0. More...
|
|
|
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetTimers (CPVRTimers &timers, const std::vector< std::shared_ptr< CPVRClient >> &clients) const |
| Get the timers. More...
|
|
bool | Persist (CPVRTimerInfoTag &timer) |
| Add or update a timer entry in the database. More...
|
|
bool | Delete (const CPVRTimerInfoTag &timer) |
| Remove a timer from the database. More...
|
|
bool | DeleteTimers () |
| Remove all timer entries from the database. More...
|
|
bool | IsOpen () |
|
bool | Compress (bool bForce=true) |
|
void | Interrupt () |
|
bool | Open (const DatabaseSettings &db) |
|
void | BeginTransaction () |
|
virtual bool | CommitTransaction () |
|
void | RollbackTransaction () |
|
void | CopyDB (const std::string &latestDb) |
|
void | DropAnalytics () |
|
std::string | PrepareSQL (std::string strStmt,...) const |
|
std::string | GetSingleValue (const std::string &strTable, const std::string &strColumn, const std::string &strWhereClause=std::string(), const std::string &strOrderBy=std::string()) |
| Get a single value from a table. More...
|
|
std::string | GetSingleValue (const std::string &query) |
|
std::string | GetSingleValue (const std::string &query, std::unique_ptr< dbiplus::Dataset > &ds) |
| Get a single value from a query on a dataset. More...
|
|
int | GetSingleValueInt (const std::string &strTable, const std::string &strColumn, const std::string &strWhereClause=std::string(), const std::string &strOrderBy=std::string()) |
| Get a single integer value from a table. More...
|
|
int | GetSingleValueInt (const std::string &query) |
|
int | GetSingleValueInt (const std::string &query, std::unique_ptr< dbiplus::Dataset > &ds) |
| Get a single integer value from a query on a dataset. More...
|
|
bool | DeleteValues (const std::string &strTable, const Filter &filter=Filter()) |
| Delete values from a table. More...
|
|
bool | ExecuteQuery (const std::string &strQuery) |
| Execute a query that does not return any result. Note that if BeginMultipleExecute() has been called, the query will be queued until CommitMultipleExecute() is called. More...
|
|
bool | ResultQuery (const std::string &strQuery) const |
| Execute a query that returns a result. More...
|
|
bool | BeginMultipleExecute () |
| Start a multiple execution queue. Any ExecuteQuery() function following this call will be queued rather than executed until CommitMultipleExecute() is performed. NOTE: Queries that rely on any queued execute query will not function as expected during this period! More...
|
|
bool | CommitMultipleExecute () |
| Commit the multiple execution queue to the database. Queries are performed within a transaction, and the transaction is rolled back should any one query fail. More...
|
|
bool | QueueInsertQuery (const std::string &strQuery) |
| Put an INSERT or REPLACE query in the queue. More...
|
|
bool | CommitInsertQueries () |
| Commit all queries in the queue. More...
|
|
size_t | GetInsertQueriesCount () |
| Get the number of INSERT queries in the queue. More...
|
|
bool | QueueDeleteQuery (const std::string &strQuery) |
| Put a DELETE query in the queue. More...
|
|
bool | CommitDeleteQueries () |
| Commit all queued DELETE queries. More...
|
|
size_t | GetDeleteQueriesCount () |
| Get the number of DELETE queries in the queue. More...
|
|
virtual bool | GetFilter (CDbUrl &dbUrl, Filter &filter, SortDescription &sorting) |
|
virtual bool | BuildSQL (const std::string &strBaseDir, const std::string &strQuery, Filter &filter, std::string &strSQL, CDbUrl &dbUrl) |
|
virtual bool | BuildSQL (const std::string &strBaseDir, const std::string &strQuery, Filter &filter, std::string &strSQL, CDbUrl &dbUrl, SortDescription &sorting) |
|
bool | Connect (const std::string &dbName, const DatabaseSettings &db, bool create) |
|