MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MythDB Class Reference

#include <libmythbase/mythdb.h>

Collaboration diagram for MythDB:
[legend]

Public Member Functions

MDBManagerGetDBManager (void)
 
QString GetDatabaseName () const
 
DatabaseParams GetDatabaseParams (void) const
 
void SetDatabaseParams (const DatabaseParams &params)
 
void SetLocalHostname (const QString &name)
 
QString GetHostName (void) const
 
void IgnoreDatabase (bool bIgnore)
 
bool IsDatabaseIgnored (void) const
 
void SetSuppressDBMessages (bool bUpgraded)
 
bool SuppressDBMessages (void) const
 
void ClearSettingsCache (const QString &key=QString())
 
void ActivateSettingsCache (bool activate=true)
 
void OverrideSettingForSession (const QString &key, const QString &newValue)
 Overrides the given setting for the execution time of the process. More...
 
void ClearOverrideSettingForSession (const QString &key)
 Clears session Overrides for the given setting. More...
 
void SaveSetting (const QString &key, int newValue)
 
void SaveSetting (const QString &key, const QString &newValue)
 
bool SaveSettingOnHost (const QString &key, const QString &newValue, const QString &host)
 
bool ClearSetting (const QString &key)
 
bool ClearSettingOnHost (const QString &key, const QString &host)
 
bool GetSettings (QMap< QString, QString > &_key_value_pairs)
 
QString GetSetting (const QString &_key, const QString &defaultval)
 
bool GetBoolSetting (const QString &key, bool defaultval)
 
int GetNumSetting (const QString &key, int defaultval)
 
double GetFloatSetting (const QString &key, double defaultval)
 
QString GetSetting (const QString &key)
 
bool GetBoolSetting (const QString &key)
 
int GetNumSetting (const QString &key)
 
double GetFloatSetting (const QString &key)
 
QString GetSettingOnHost (const QString &_key, const QString &_host, const QString &defaultval)
 
int GetNumSettingOnHost (const QString &key, const QString &host, int defaultval)
 
double GetFloatSettingOnHost (const QString &key, const QString &host, double defaultval)
 
QString GetSettingOnHost (const QString &key, const QString &host)
 
int GetNumSettingOnHost (const QString &key, const QString &host)
 
double GetFloatSettingOnHost (const QString &key, const QString &host)
 
void GetResolutionSetting (const QString &type, int &width, int &height, double &forced_aspect, double &refresh_rate, int index=-1)
 
void GetResolutionSetting (const QString &t, int &w, int &h, int i=-1)
 
void WriteDelayedSettings (void)
 
void SetHaveDBConnection (bool connected)
 Set a flag indicating we have successfully connected to the database. More...
 
void SetHaveSchema (bool schema)
 Set a flag indicating that we have discovered tables and that this therefore not a new empty database. More...
 
bool HaveSchema (void) const
 Get a flag indicating that we have discovered tables and that this therefore not a new empty database. More...
 
bool HaveValidDatabase (void) const
 Returns true if we have successfully connected to the database and that database has tables. More...
 

Static Public Member Functions

static QString GetError (const QString &where, const MSqlQuery &query)
 
static void DBError (const QString &where, const MSqlQuery &query)
 
static QString DBErrorMessage (const QSqlError &err)
 
static MythDBgetMythDB ()
 
static void destroyMythDB ()
 
static QString toCommaList (const QMap< QString, QVariant > &bindings, uint indent=0, uint softMaxColumn=80)
 

Protected Member Functions

 MythDB ()
 
 ~MythDB ()
 

Private Member Functions

 Q_DISABLE_COPY_MOVE (MythDB)
 

Private Attributes

MythDBPrivated {nullptr}
 

Friends

class MSqlQuery
 

Detailed Description

Definition at line 14 of file mythdb.h.

Constructor & Destructor Documentation

◆ MythDB()

MythDB::MythDB ( )
protected

Definition at line 131 of file mythdb.cpp.

◆ ~MythDB()

MythDB::~MythDB ( )
protected

Definition at line 135 of file mythdb.cpp.

Member Function Documentation

◆ GetDBManager()

MDBManager * MythDB::GetDBManager ( void  )

Definition at line 140 of file mythdb.cpp.

◆ GetError()

QString MythDB::GetError ( const QString &  where,
const MSqlQuery query 
)
static

Definition at line 194 of file mythdb.cpp.

Referenced by MSqlQuery::exec().

◆ DBError()

void MythDB::DBError ( const QString &  where,
const MSqlQuery query 
)
static

Definition at line 225 of file mythdb.cpp.

Referenced by SingleValueImp::add(), MultiValueImp::add(), add_genres(), ChannelGroup::AddChannel(), ChannelGroup::AddChannelGroup(), CardUtil::AddChildInput(), MythSessionManager::AddDigestUser(), V2Capture::AddDiseqcConfig(), V2Capture::AddDiseqcTree(), MusicFileScanner::AddFileToDB(), AddFileType(), RecordingInfo::AddHistory(), ProfileGroup::addMissingDynamicProfiles(), Scheduler::AddNewRecords(), Scheduler::AddNotListed(), V2Capture::AddRecProfile(), Myth::AddStorageGroupDir(), V2Myth::AddStorageGroupDir(), AllStream::addStream(), ChannelScanSM::AddToList(), LiveTVChain::AppendNewProgram(), ChannelRecPriority::applyChannelRecPriorityChange(), RecordingInfo::ApplyOriginalAirDateChange(), RecordingInfo::ApplyRecordPlayGroupChange(), RecordingInfo::ApplyRecordRecGroupChange(), RecordingInfo::ApplyRecordRecID(), RecordingInfo::ApplyRecordRecTitleChange(), RecordingInfo::ApplyStarsChange(), RecordingInfo::ApplyStorageGroupChange(), RecordingInfo::ApplyTranscoderProfileChange(), RecordingInfo::ApplyTranscoderProfileChangeById(), MainServer::BackendQueryDiskSpace(), DBUtil::BackupDB(), Scheduler::BuildNewRecordsQueries(), change_program(), change_record(), MythSessionManager::ChangeDigestUserPassword(), JobQueue::ChangeJobArgs(), JobQueue::ChangeJobCmds(), JobQueue::ChangeJobComment(), JobQueue::ChangeJobFlags(), JobQueue::ChangeJobHost(), JobQueue::ChangeJobStatus(), chanid_available(), ChannelOptionsCommon::ChannelOptionsCommon(), ChannelScanSM::ChannelScanSM(), check_cardsource(), StorageGroup::CheckAllStorageGroupDirs(), ImportIconsWizard::checkAndDownload(), ChannelBase::CheckChannel(), TVRec::CheckChannelPrefix(), checkChannelPresets(), checkHandlers(), checkImageStoragePaths(), checkInputDisplayNames(), ProgramInfo::CheckProgramIDAuthorities(), checkStorageGroup(), checkStoragePaths(), DBUtil::CheckTableColumnExists(), DBUtil::CheckTables(), ImportMusicDialog::chooseBackend(), Ripper::chooseBackend(), MusicFileScanner::cleanDB(), CleanupTask::CleanupChannelTables(), CleanupTask::CleanupInUsePrograms(), CleanupMyOldInUsePrograms(), JobQueue::CleanupOldJobsInQueue(), CleanupTask::CleanupOldRecordings(), CleanupTask::CleanupOrphanedLiveTV(), CleanupTask::CleanupProgramListings(), CleanupTask::CleanupRecordedTables(), clearAllKeys(), GameHandler::clearAllMetadata(), clearArchiveTable(), EITCache::ClearChannelLocks(), ImageDb< ImageAdapterLocal >::ClearDb(), ClearEIT(), ProgramInfo::ClearMarkupMap(), ProgramInfo::ClearPositionMap(), clearRSSArticles(), clearTreeItems(), clone_capturecard(), KeyBindings::CommitAction(), KeyBindings::CommitJumppoint(), CompleteJob(), V2Channel::CopyIconToBackend(), DBUtil::CountClients(), DiSEqCDevDevice::CreateById(), CardUtil::CreateCaptureCard(), CardUtil::CreateCardInput(), ChannelUtil::CreateChannel(), Scheduler::CreateConflictLists(), MusicMetadata::createFromFilename(), CardUtil::CreateInputGroup(), CardInput::CreateNewInputGroupSlot(), PlayGroupEditor::CreateNewPlayBackGroupSlot(), RecordingProfileEditor::CreateNewProfile(), MythVideoProfile::CreateProfile(), MythVideoProfile::CreateProfileGroup(), SourceUtil::CreateSource(), ImageDbLocal::CreateTable(), Scheduler::CreateTempTables(), PlaybackBox::createTranscodingProfilesMenu(), ChannelEditor::customEvent(), StorageGroupEditor::customEvent(), ProgramRecPriority::deactivate(), commDetector2::debugDirectory(), RecordingRule::Delete(), TransportListEditor::Delete(), delete_in_db(), delete_markup_datum(), delete_program(), CaptureCardEditor::DeleteAllCaptureCardsOnHost(), JobQueue::DeleteAllJobs(), SourceUtil::DeleteAllSources(), SmartPlaylistEditor::deleteCategory(), ChannelGroup::DeleteChannel(), ChannelUtil::DeleteChannel(), CustomPriority::deleteClicked(), PhrasePopup::deleteClicked(), PowerSearchPopup::deleteClicked(), MythVideoProfile::DeleteDB(), GamePlayerSetting::deleteEntry(), PlayGroupConfig::deleteEntry(), RecordingProfile::deleteEntry(), ChannelGroupSetting::deleteEntry(), Ripper::deleteExistingTrack(), RomInfo::DeleteFromDatabase(), VideoMetadataImp::DeleteFromDatabase(), RecordingInfo::DeleteHistory(), CardUtil::DeleteInput(), PrevRecordedList::DeleteOldEpisode(), ProgLister::DeleteOldEpisode(), PrevRecordedList::DeleteOldSeries(), ProgLister::DeleteOldSeries(), PlaylistContainer::deletePlaylist(), MythVideoProfile::DeleteProfileGroup(), LiveTVChain::DeleteProgram(), MainServer::DeleteRecordedFiles(), V2Capture::DeleteRecProfile(), CustomEdit::deleteRule(), ScanInfo::DeleteScan(), SmartPlaylistEditor::deleteSmartPlaylist(), SourceUtil::DeleteSource(), Scheduler::DeleteTempTables(), ChannelImporter::DeleteUnusedTransports(), LiveTVChain::DestroyChain(), MythSessionManager::DestroyUserSession(), MainServer::DoDeleteInDB(), StorageGroupEditor::DoDeleteSlot(), StorageGroupDirSetting::DoDeleteSlot(), RestoreData::doRestore(), RestoreData::doSave(), GameScanner::doScanAll(), StatusBox::doScheduleStatus(), StatusBox::doTunerStatus(), SearchStream::doUpdateStreams(), doUpgradeMusicDatabaseSchema(), doUpgradeTVDatabaseSchema(), doUpgradeVideoDatabaseSchema(), ImageDbLocal::DropTable(), MusicMetadata::dumpToDatabase(), AlbumArtImages::dumpToDatabase(), DiSEqCDevTree::Exists(), AutoExpire::ExpireEpisodesOverMax(), AutoExpire::ExpireRecordings(), NativeArchive::exportVideo(), RomInfo::fillData(), DTVMultiplex::FillFromDB(), ScanDTVTransport::FillFromDB(), ChannelRecPriority::FillList(), ProgramRecPriority::FillList(), Scheduler::FillRecordingDir(), Scheduler::FillRecordListFromDB(), ProfileGroup::fillSelections(), Source::fillSelections(), RecordingProfile::fillSelections(), CaptureCard::fillSelections(), Playlist::fillSonglistFromQuery(), Playlist::fillSonglistFromSmartPlaylist(), ProgLister::FillViewList(), findAllDBSearchGrabbers(), findAllDBTreeGrabbers(), findAllDBTreeGrabbersByHost(), findByURL(), ChannelUtil::FindChannel(), StorageGroup::FindDirs(), ChannelID::findHighest(), findInDB(), FindInDB(), RecordingExtender::findKnownSport(), SourceManager::findScripts(), SourceManager::findScriptsDB(), findSearchGrabberByCommand(), findSearchGrabberInDB(), findTreeGrabberByCommand(), findTreeGrabberInDB(), LiveTVChain::FinishedRecording(), RecordingInfo::FinishedRecording(), FlagCommercials(), RecordingInfo::ForgetHistory(), FromProgramQuery(), get_cardtype(), get_chan_id_from_db_atsc(), get_chan_id_from_db_dtv(), get_chan_id_from_db_dvb(), get_dtv_multiplex(), get_highest_input(), get_inputtypes(), get_max_chanid(), get_on_input(), get_use_eit(), get_valid_recorder_list(), MusicMetadata::getAlbumId(), CardUtil::GetAllInputInfo(), RomInfo::GetAllRomInfo(), Scheduler::GetAllScheduled(), MusicMetadata::getArtistId(), GetArtwork(), ChannelUtil::GetATSCChannel(), ChannelGroup::GetAutomaticChannelGroups(), V2Channel::GetAvailableChanid(), ChannelUtil::GetBetterMplexID(), ChannelUtil::GetCachedPids(), Capture::GetCaptureCard(), V2Capture::GetCaptureCard(), Capture::GetCaptureCardList(), V2Capture::GetCaptureCardList(), GetCategoryList(), ChannelBase::GetChanID(), DVBChannel::GetChanID(), ChannelUtil::GetChanID(), ChannelUtil::GetChanIDs(), ChannelUtil::GetChannelData(), ChannelGroup::GetChannelGroupId(), ChannelGroup::GetChannelGroupName(), TVRec::GetChannelInfo(), ChannelUtil::GetChannelsInternal(), ChannelUtil::GetChannelStringField(), ChannelUtil::GetChannelValueStr(), CardUtil::GetChildInputCount(), CardUtil::GetChildInputIDs(), MusicMetadata::getCompilationArtistId(), CardUtil::GetConfiguredDVBInputs(), ChannelUtil::GetConflicting(), CardUtil::GetConflictingInputs(), PlayGroup::GetCount(), ChannelImporter::GetDBTransports(), ChannelUtil::GetDefaultAuthority(), RecordingRule::GetDefaultFilter(), ImageDb< ImageAdapterLocal >::GetDescendantCount(), ImageDb< ImageAdapterLocal >::GetDescendants(), CardUtil::GetDeviceInputGroup(), TVRec::GetDevices(), ImageDb< ImageAdapterLocal >::GetDirectory(), MusicFileScanner::GetDirectoryId(), MusicMetadata::getDirectoryId(), V2Capture::GetDiseqcConfigList(), V2Capture::GetDiseqcTreeList(), CardUtil::GetDisplayName(), NativeArchive::getFieldList(), V4LChannel::GetFormatForChannel(), MusicMetadata::getGenreId(), CardUtil::GetGroupInputIDs(), Myth::GetHosts(), V2Myth::GetHosts(), ChannelUtil::GetIcon(), PlayGroup::GetInitialName(), CardUtil::GetInputGroups(), CardUtil::GetInputIDs(), CardUtil::GetInputInfo(), CardUtil::GetInputList(), CardUtil::GetInputTypeNames(), CardUtil::GetInputTypes(), ChannelUtil::GetInputTypes(), ChannelUtil::GetIPTVTuningData(), JobQueue::GetJobArgs(), JobQueue::GetJobCmd(), JobQueue::GetJobFlags(), JobQueue::GetJobID(), JobQueue::GetJobInfoFromID(), JobQueue::GetJobsInQueue(), JobQueue::GetJobStatus(), Myth::GetKeys(), V2Myth::GetKeys(), V2Video::GetLastPlayPos(), getLcnOffset(), SourceUtil::GetListingsLoginData(), CardUtil::GetLiveTVInputList(), Myth::GetLogs(), V2Myth::GetLogs(), ChannelGroup::GetManualChannelGroups(), ChannelUtil::GetMplexID(), SourceUtil::GetMplexIDs(), Content::GetMusic(), V2Content::GetMusic(), RecordingProfile::getName(), PlayGroup::GetNames(), TVRec::GetNextProgram(), DBEvent::GetOverlappingPrograms(), MythSessionManager::GetPasswordDigest(), DBPerson::GetPersonDB(), MythVideoProfile::GetProfileGroupID(), MythVideoProfile::GetProfiles(), RecordingProfile::GetProfiles(), Dvr::GetProgramCategories(), V2Dvr::GetProgramCategories(), CardUtil::GetQuickTuning(), ProgDetails::getRatings(), RecordingInfo::GetRecgroupID(), Dvr::GetRecGroupList(), V2Dvr::GetRecGroupList(), RecordingInfo::GetRecgroupString(), V2Capture::GetRecProfileGroupList(), RomInfo::GetRomInfoById(), getRSSArticles(), V2Video::GetSavedBookmark(), Video::GetSavedBookmark(), CardUtil::GetSchedInputList(), ChannelUtil::GetServiceVersion(), PlayGroup::GetSetting(), Myth::GetSetting(), V2Myth::GetSetting(), Myth::GetSettingList(), V2Myth::GetSettingList(), GetSettingsMap(), ProgFinder::getShowNames(), RemoteEncoder::GetSignalLockTimeout(), PlaylistEditorView::getSmartPlaylistCategories(), SmartPlaylistEditor::getSmartPlaylistCategories(), PlaylistEditorView::getSmartPlaylists(), PlaylistEditorView::getSmartPlaylistTracks(), SourceUtil::GetSourceID(), ChannelUtil::GetSourceID(), CardUtil::GetSourceID(), ChannelUtil::GetSourceIDForChannel(), SourceUtil::GetSourceName(), CardUtil::GetStartChannel(), Myth::GetStorageGroupDirs(), V2Myth::GetStorageGroupDirs(), DBUtil::GetTables(), RecordingRule::GetTemplateNames(), CardUtil::GetTimeouts(), Dvr::GetTitleInfoList(), V2Dvr::GetTitleInfoList(), Dvr::GetTitleList(), V2Dvr::GetTitleList(), getTreeArticles(), CardUtil::GetTunerTypeFromMultiplex(), ChannelUtil::GetTuningParams(), V2Capture::GetUserInputGroupList(), Content::GetVideo(), V2Content::GetVideo(), Content::GetVideoArtwork(), V2Content::GetVideoArtwork(), V2Video::GetVideoCommBreak(), V2Video::GetVideoCutList(), CardUtil::GetVideoDevices(), Channel::GetVideoMultiplex(), V2Channel::GetVideoMultiplex(), Channel::GetVideoMultiplexList(), V2Channel::GetVideoMultiplexList(), Channel::GetVideoSource(), V2Channel::GetVideoSource(), Channel::GetVideoSourceList(), V2Channel::GetVideoSourceList(), Channel::GetXMLTVIdList(), V2Channel::GetXMLTVIdList(), FillData::GrabData(), RecordingProfile::groupType(), ChannelData::handleChannels(), MainServer::HandleGetPendingRecordings(), ProgramData::HandlePrograms(), MainServer::HandleQueryFindFile(), Scheduler::HandleReschedule(), MainServer::HandleScanMusic(), SourceUtil::HasDigitalChannel(), NativeArchive::importRecording(), NativeArchive::importVideo(), ChannelBase::InitializeInput(), Scheduler::InitInputInfoMap(), insert_dtv_multiplex(), insert_markup_datum(), DBPerson::InsertCreditsDB(), DBEvent::InsertDB(), ProgInfo::InsertDB(), ImageDb< ImageAdapterLocal >::InsertDbImage(), insertGrabberInDB(), insertInDB(), InsertInDB(), DBPerson::InsertPersonDB(), RecordingInfo::InsertProgram(), DBPerson::InsertRoleDB(), insertRSSArticleInDB(), insertTreeArticleInDB(), CustomPriority::installClicked(), is_dishnet_eit(), SourceUtil::IsAnySourceScanable(), SourceUtil::IsEncoder(), CardUtil::IsInputTypePresent(), isNewTune(), SourceUtil::IsSourceIDValid(), isTreeInUse(), CardUtil::IsTunerShared(), CardUtil::IsUniqueDisplayName(), MythSessionManager::IsValidUser(), lastUpdate(), CardUtil::LinkInputGroup(), StorageGroupEditor::Load(), RecordingFile::Load(), StorageGroupListEditor::Load(), RecordingRule::Load(), DiSEqCDevSettings::Load(), InputSelector::Load(), PlaylistContainer::load(), ChannelInfo::Load(), GamePlayersList::Load(), ProgramInfoCache::Load(), SimpleDBStorage::Load(), TransportListEditor::Load(), DiSEqCDevTree::Load(), VideoSourceShow::Load(), TransFreqTableSelector::Load(), DiSEqCDevSwitch::Load(), DiSEqCDevRotor::Load(), DiSEqCDevSCR::Load(), DiSEqCDevLNB::Load(), CardInputEditor::Load(), InputGroup::Load(), load_markup_datum(), load_settings(), VideoMetadataListManager::loadAllFromDatabase(), RecordingProfile::loadByGroup(), RecordingProfile::loadByID(), RecordingRule::LoadBySearch(), RecordingProfile::loadByType(), EITCache::LoadChannel(), MHIContext::LoadChannelCache(), ChannelGroupSetting::LoadChannelGroupChannels(), ChannelUtil::LoadChannels(), MythBurn::loadConfiguration(), KeyBindings::LoadContexts(), CustomPriority::loadData(), CustomEdit::loadData(), PrevRecordedList::LoadDates(), MythVideoProfile::LoadDB(), SmartPlaylistEditor::loadFromDatabase(), LoadFromOldRecorded(), LoadFromRecorded(), ChannelInfo::LoadGroupIds(), ChannelInfo::LoadInputIds(), KeyBindings::LoadJumppoints(), ProgDetails::loadPage(), Playlist::loadPlaylistByID(), ProgramInfo::LoadProgramFromRecorded(), LoadScan(), LoadScanList(), MythSessionManager::LoadSessions(), MythNews::loadSites(), AllStream::loadStreams(), RecordingRule::LoadTemplate(), PrevRecordedList::LoadTitles(), FileServerHandler::LocalFilePath(), MainServer::LocalFilePath(), lock_channel(), lockShutdown(), SmartPlaylistEditor::lookupCategoryID(), main(), ProgramInfo::MarkAsInUse(), ScanInfo::MarkProcessed(), markTreeUpdated(), markUpdated(), RecordingExtender::nameCleanup(), needsMFDBReminder(), SmartPlaylistEditor::newCategory(), Scheduler::OldRecordedFixups(), IPTVChannelFetcher::ParsePlaylist(), MusicMetadata::persist(), ProgDetails::PowerPriorities(), WeatherSource::ProbeScript(), WeatherSource::processExit(), program_exists(), purgeGameDB(), ProgramInfo::QueryAverageAspectRatio(), ProgramInfo::QueryBasename(), ProgramInfo::QueryBookmarkTimeStamp(), PlaybackState::QueryData(), DBUtil::QueryDBMSVersion(), FileServerHandler::QueryFileSystems(), ProgramInfo::QueryKeyFrameInfo(), ProgramInfo::QueryMarkup(), ProgramInfo::QueryMarkupMap(), ProgramInfo::QueryMplexID(), ProgramInfo::QueryPositionMap(), ProgramInfo::QueryTuningInfo(), JobQueue::QueueJob(), RecordingInfo::ReactivateRecording(), ImageDb< ImageAdapterLocal >::ReadAllImages(), ImageDb< ImageAdapterLocal >::ReadImages(), RecordingInfo::RecordingInfo(), MythMainWindow::RegisterJump(), MythMainWindow::RegisterKey(), MultiValueImp::remove(), ChannelGroup::RemoveChannelGroup(), MythSessionManager::RemoveDigestUser(), V2Capture::RemoveDiseqcConfig(), V2Capture::RemoveDiseqcTree(), MusicFileScanner::RemoveFileFromDB(), removeFromDB(), RemoveFromDB(), ImageDb< ImageAdapterLocal >::RemoveFromDB(), removeGrabberFromDB(), Myth::RemoveStorageGroupDir(), V2Myth::RemoveStorageGroupDir(), AllStream::removeStream(), SmartPlaylistEditor::renameCategory(), DBUtil::RepairTables(), Scheduler::ResetDuplicates(), AllMusic::resync(), romInDB(), JobQueue::SafeDeleteJob(), ChannelID::Save(), RecordingFile::Save(), PlayGroupConfig::Save(), RecordingRule::Save(), SimpleDBStorage::Save(), TransFreqTableSelector::Save(), AutoIncrementSetting::Save(), XMLTVGrabber::Save(), ProgramInfo::SaveAspect(), ProgramInfo::SaveAutoExpire(), ProgramInfo::SaveBasename(), ProgramInfo::SaveBDBookmark(), ChannelUtil::SaveCachedPids(), SmartPlaylistEditor::saveClicked(), ProgramInfo::SaveCommFlagged(), ExportNative::saveConfiguration(), MythBurn::saveConfiguration(), ProgramInfo::SaveCutList(), ScreenSetup::saveData(), MythVideoProfile::SaveDB(), ProgramInfo::SaveDeletePendingFlag(), ProgramInfo::SaveDVDBookmark(), ProgramInfo::SaveEditing(), ProgramInfo::SaveFilesize(), ProgramInfo::SaveFrameRate(), MusicMetadata::saveHostname(), ProgramInfo::SaveMarkup(), ProgramInfo::SaveMarkupMap(), Playlist::savePlaylist(), ProgramInfo::SavePositionMap(), ProgramInfo::SavePositionMapDelta(), ProgramInfo::SavePreserve(), ProgramInfo::SaveResolution(), SaveScan(), ScanDTVTransport::SaveScan(), ChannelInsertInfo::SaveScan(), ProgramInfo::SaveSeasonEpisode(), SaveSettingOnHost(), SmartPLCriteriaRow::saveToDatabase(), RomInfo::SaveToDatabase(), VideoMetadataImp::saveToDatabase(), ProgramInfo::SaveTranscodeStatus(), ProgramInfo::SaveVideoProperties(), ProgramInfo::SaveVideoScanType(), ProgramInfo::SaveWatched(), MusicFileScanner::ScanArtwork(), MusicFileScanner::ScanMusic(), ProgramRecPriority::scheduleChanged(), set_on_input(), SetArtwork(), TVRec::SetChannelInfo(), ImageDb< ImageAdapterLocal >::SetCover(), RecordingInfo::SetDupHistory(), RomInfo::setFavorite(), setGlobalSetting(), ImageDb< ImageAdapterLocal >::SetHidden(), V2Video::SetLastPlayPos(), ImageDb< ImageAdapterLocal >::SetOrientation(), ScanWizard::SetPaneDefaults(), PlaybackBox::SetRecGroupPassword(), V2Video::SetSavedBookmark(), Video::SetSavedBookmark(), ChannelUtil::SetServiceVersion(), CardUtil::SetStartChannel(), Weather::SetupScreens(), SourceManager::setupSources(), setupTVs(), ChannelUtil::SetVisible(), TVRec::ShouldSwitchToAnotherInput(), GeneralSettings::slotDoResetDB(), MythNews::slotNewsRetrieved(), ChannelOptionsCommon::sourceChanged(), HouseKeeper::Start(), EITScanner::StartActiveScan(), RecordingInfo::StartedRecording(), DiSEqCDevSettings::Store(), DiSEqCDevTree::Store(), DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), DiSEqCDevLNB::Store(), ChannelBase::StoreInputChannels(), CustomEdit::storeRule(), CustomPriority::testSchedule(), ChannelGroup::ToggleChannel(), CardUtil::UnlinkInputGroup(), unlock_channel(), DBUtil::UnlockSchema(), unlockShutdown(), SearchStream::updateBroadcasters(), ChannelUtil::UpdateChannel(), ChannelGroup::UpdateChannelGroup(), ChannelGroup::UpdateChannelGroups(), ChannelUtil::UpdateChannelNumberFromDB(), SearchStream::updateCountries(), DBEvent::UpdateDB(), ImageDb< ImageAdapterLocal >::UpdateDbImage(), V2Capture::UpdateDiseqcTree(), updateDiskCount(), updateDisplayRom(), Scheduler::UpdateDuplicates(), GameHandler::UpdateGameDB(), updateGameName(), SearchStream::updateGenres(), VideoMetadata::UpdateHashedDBRecord(), UpdateHashes(), ChannelUtil::UpdateInsertInfoFromDB(), ChannelUtil::UpdateIPTVTuningData(), ProgLister::UpdateKeywordInDB(), SearchStream::updateLanguages(), ProgramInfo::UpdateLastDelete(), ProgramInfo::UpdateLastPlayTimeStamp(), HouseKeeperTask::UpdateLastRun(), Scheduler::UpdateManuals(), ProgramInfo::UpdateMarkTimeStamp(), SmartPlaylistEditor::updateMatches(), Scheduler::UpdateMatches(), Scheduler::UpdateNextRecord(), RecordingInfo::UpdateRecordingEnd(), V2Capture::UpdateRecProfile(), V2Capture::UpdateRecProfileParam(), SourceUtil::UpdateSource(), AllStream::updateStream(), MusicMetadata::updateStreamList(), SearchView::updateTracksList(), Channel::UpdateVideoSource(), V2Channel::UpdateVideoSource(), UpgradeGameDatabaseSchema(), RecordingRule::UseTempTable(), Scheduler::VerifyCards(), GameHandler::VerifyGameDB(), and EITCache::WriteToDB().

◆ DBErrorMessage()

QString MythDB::DBErrorMessage ( const QSqlError &  err)
static

◆ GetDatabaseName()

QString MythDB::GetDatabaseName ( ) const

Definition at line 245 of file mythdb.cpp.

◆ GetDatabaseParams()

DatabaseParams MythDB::GetDatabaseParams ( void  ) const

Definition at line 250 of file mythdb.cpp.

◆ SetDatabaseParams()

void MythDB::SetDatabaseParams ( const DatabaseParams params)

Definition at line 255 of file mythdb.cpp.

◆ SetLocalHostname()

void MythDB::SetLocalHostname ( const QString &  name)

Definition at line 260 of file mythdb.cpp.

◆ GetHostName()

QString MythDB::GetHostName ( void  ) const

Definition at line 269 of file mythdb.cpp.

◆ IgnoreDatabase()

void MythDB::IgnoreDatabase ( bool  bIgnore)

Definition at line 274 of file mythdb.cpp.

◆ IsDatabaseIgnored()

bool MythDB::IsDatabaseIgnored ( void  ) const

Definition at line 279 of file mythdb.cpp.

◆ SetSuppressDBMessages()

void MythDB::SetSuppressDBMessages ( bool  bUpgraded)

Definition at line 284 of file mythdb.cpp.

◆ SuppressDBMessages()

bool MythDB::SuppressDBMessages ( void  ) const

Definition at line 289 of file mythdb.cpp.

◆ ClearSettingsCache()

void MythDB::ClearSettingsCache ( const QString &  key = QString())

Definition at line 919 of file mythdb.cpp.

◆ ActivateSettingsCache()

void MythDB::ActivateSettingsCache ( bool  activate = true)

Definition at line 953 of file mythdb.cpp.

◆ OverrideSettingForSession()

void MythDB::OverrideSettingForSession ( const QString &  key,
const QString &  value 
)

Overrides the given setting for the execution time of the process.

This allows defining settings for the session only, without touching the settings in the data base.

Definition at line 850 of file mythdb.cpp.

◆ ClearOverrideSettingForSession()

void MythDB::ClearOverrideSettingForSession ( const QString &  key)

Clears session Overrides for the given setting.

Definition at line 874 of file mythdb.cpp.

◆ SaveSetting() [1/2]

void MythDB::SaveSetting ( const QString &  key,
int  newValue 
)

Definition at line 294 of file mythdb.cpp.

◆ SaveSetting() [2/2]

void MythDB::SaveSetting ( const QString &  key,
const QString &  newValue 
)

Definition at line 300 of file mythdb.cpp.

◆ SaveSettingOnHost()

bool MythDB::SaveSettingOnHost ( const QString &  key,
const QString &  newValue,
const QString &  host 
)

Definition at line 305 of file mythdb.cpp.

◆ ClearSetting()

bool MythDB::ClearSetting ( const QString &  key)

Definition at line 411 of file mythdb.cpp.

◆ ClearSettingOnHost()

bool MythDB::ClearSettingOnHost ( const QString &  key,
const QString &  host 
)

Definition at line 416 of file mythdb.cpp.

◆ GetSettings()

bool MythDB::GetSettings ( QMap< QString, QString > &  _key_value_pairs)

Definition at line 493 of file mythdb.cpp.

◆ GetSetting() [1/2]

QString MythDB::GetSetting ( const QString &  _key,
const QString &  defaultval 
)

Definition at line 421 of file mythdb.cpp.

◆ GetBoolSetting() [1/2]

bool MythDB::GetBoolSetting ( const QString &  key,
bool  defaultval 
)

Definition at line 614 of file mythdb.cpp.

◆ GetNumSetting() [1/2]

int MythDB::GetNumSetting ( const QString &  key,
int  defaultval 
)

Definition at line 622 of file mythdb.cpp.

◆ GetFloatSetting() [1/2]

double MythDB::GetFloatSetting ( const QString &  key,
double  defaultval 
)

Definition at line 630 of file mythdb.cpp.

◆ GetSetting() [2/2]

QString MythDB::GetSetting ( const QString &  key)

Definition at line 638 of file mythdb.cpp.

◆ GetBoolSetting() [2/2]

bool MythDB::GetBoolSetting ( const QString &  key)

Definition at line 645 of file mythdb.cpp.

◆ GetNumSetting() [2/2]

int MythDB::GetNumSetting ( const QString &  key)

Definition at line 654 of file mythdb.cpp.

◆ GetFloatSetting() [2/2]

double MythDB::GetFloatSetting ( const QString &  key)

Definition at line 661 of file mythdb.cpp.

◆ GetSettingOnHost() [1/2]

QString MythDB::GetSettingOnHost ( const QString &  _key,
const QString &  _host,
const QString &  defaultval 
)

Definition at line 668 of file mythdb.cpp.

◆ GetNumSettingOnHost() [1/2]

int MythDB::GetNumSettingOnHost ( const QString &  key,
const QString &  host,
int  defaultval 
)

Definition at line 736 of file mythdb.cpp.

◆ GetFloatSettingOnHost() [1/2]

double MythDB::GetFloatSettingOnHost ( const QString &  key,
const QString &  host,
double  defaultval 
)

Definition at line 745 of file mythdb.cpp.

◆ GetSettingOnHost() [2/2]

QString MythDB::GetSettingOnHost ( const QString &  key,
const QString &  host 
)

Definition at line 754 of file mythdb.cpp.

◆ GetNumSettingOnHost() [2/2]

int MythDB::GetNumSettingOnHost ( const QString &  key,
const QString &  host 
)

Definition at line 761 of file mythdb.cpp.

◆ GetFloatSettingOnHost() [2/2]

double MythDB::GetFloatSettingOnHost ( const QString &  key,
const QString &  host 
)

Definition at line 768 of file mythdb.cpp.

◆ GetResolutionSetting() [1/2]

void MythDB::GetResolutionSetting ( const QString &  type,
int &  width,
int &  height,
double &  forced_aspect,
double &  refresh_rate,
int  index = -1 
)

◆ GetResolutionSetting() [2/2]

void MythDB::GetResolutionSetting ( const QString &  t,
int &  w,
int &  h,
int  i = -1 
)

◆ WriteDelayedSettings()

void MythDB::WriteDelayedSettings ( void  )

Definition at line 964 of file mythdb.cpp.

◆ SetHaveDBConnection()

void MythDB::SetHaveDBConnection ( bool  connected)

Set a flag indicating we have successfully connected to the database.

Definition at line 982 of file mythdb.cpp.

◆ SetHaveSchema()

void MythDB::SetHaveSchema ( bool  schema)

Set a flag indicating that we have discovered tables and that this therefore not a new empty database.

Definition at line 991 of file mythdb.cpp.

◆ HaveSchema()

bool MythDB::HaveSchema ( void  ) const

Get a flag indicating that we have discovered tables and that this therefore not a new empty database.

This flag is set only once on startup, it is assumed that the tables won't be deleted out from under a running application

Definition at line 1003 of file mythdb.cpp.

◆ HaveValidDatabase()

bool MythDB::HaveValidDatabase ( void  ) const

Returns true if we have successfully connected to the database and that database has tables.

This does not indicate that we have a database connection or valid schema at this precise moment, only that it was true at the last check

Definition at line 1015 of file mythdb.cpp.

◆ getMythDB()

MythDB * MythDB::getMythDB ( )
static

◆ destroyMythDB()

void MythDB::destroyMythDB ( )
static

Definition at line 42 of file mythdb.cpp.

Referenced by DestroyMythDB().

◆ toCommaList()

QString MythDB::toCommaList ( const QMap< QString, QVariant > &  bindings,
uint  indent = 0,
uint  softMaxColumn = 80 
)
static

Definition at line 145 of file mythdb.cpp.

◆ Q_DISABLE_COPY_MOVE()

MythDB::Q_DISABLE_COPY_MOVE ( MythDB  )
private

Friends And Related Function Documentation

◆ MSqlQuery

friend class MSqlQuery
friend

Definition at line 16 of file mythdb.h.

Member Data Documentation

◆ d

MythDBPrivate* MythDB::d {nullptr}
private

Definition at line 96 of file mythdb.h.


The documentation for this class was generated from the following files: