#include </home/clem/local/src/opie/noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.h>
Inheritance diagram for OContactAccessBackend_SQL:


Public Member Functions | |
| OContactAccessBackend_SQL (const QString &appname, const QString &filename=QString::null) | |
| ~OContactAccessBackend_SQL () | |
| bool | save () |
| bool | load () |
| void | clear () |
| bool | wasChangedExternally () |
| QArray< int > | allRecords () const |
| OContact | find (int uid) const |
| QArray< int > | queryByExample (const OContact &query, int settings, const QDateTime &d) |
| QArray< int > | matchRegexp (const QRegExp &r) const |
| const uint | querySettings () |
| bool | hasQuerySettings (uint querySettings) const |
| QArray< int > | sorted (bool asc, int, int, int) |
| bool | add (const OContact &newcontact) |
| bool | replace (const OContact &contact) |
| bool | remove (int uid) |
| bool | reload () |
Protected Attributes | |
| bool | m_changed |
| QString | m_fileName |
| QArray< int > | m_uids |
| Opie::DB::OSQLDriver * | m_driver |
Private Member Functions | |
| QArray< int > | extractUids (Opie::DB::OSQLResult &res) const |
| QMap< int, QString > | requestNonCustom (int uid) const |
| QMap< QString, QString > | requestCustom (int uid) const |
| void | update () |
Definition at line 58 of file ocontactaccessbackend_sql.h.
|
||||||||||||
|
Definition at line 477 of file ocontactaccessbackend_sql.cpp. References Global::applicationFileName(), QTime::elapsed(), QString::isEmpty(), load(), m_driver, m_fileName, qWarning(), Opie::DB::OSQLDriver::setUrl(), Opie::DB::OSQLManager::standard(), QTime::start(), and t. |
|
|
Definition at line 501 of file ocontactaccessbackend_sql.cpp. References m_driver. |
|
|
add T Implements OPimAccessBackend< OContact >. Definition at line 559 of file ocontactaccessbackend_sql.cpp. References m_driver, m_uids, Opie::DB::OSQLDriver::query(), and Opie::DB::OSQLResult::state(). Referenced by replace(). |
|
|
return an array of all available uids Implements OPimAccessBackend< OContact >. Definition at line 548 of file ocontactaccessbackend_sql.cpp. |
|
|
clear the back end Implements OPimAccessBackend< OContact >. Definition at line 535 of file ocontactaccessbackend_sql.cpp. References m_driver, Opie::DB::OSQLDriver::query(), and reload(). |
|
|
Definition at line 774 of file ocontactaccessbackend_sql.cpp. References QValueList< T >::begin(), QValueList< T >::count(), QTime::elapsed(), QValueList< T >::end(), i, list, qWarning(), Opie::DB::OSQLResult::results(), QTime::start(), and t. Referenced by queryByExample(), sorted(), and update(). |
|
|
find the OPimRecord with uid
Implements OPimAccessBackend< OContact >. Definition at line 597 of file ocontactaccessbackend_sql.cpp. References QTime::elapsed(), qWarning(), requestCustom(), requestNonCustom(), OPimRecord::setExtraMap(), QTime::start(), and t. |
|
|
Check whether settings are correct.
Implements OContactAccessBackend. Definition at line 673 of file ocontactaccessbackend_sql.cpp. References OContactAccess::DateDay, OContactAccess::DateDiff, OContactAccess::DateMonth, OContactAccess::DateYear, OContactAccess::ExactMatch, OContactAccess::IgnoreCase, OContactAccess::RegExp, and OContactAccess::WildCards. |
|
|
load the resource Implements OPimAccessBackend< OContact >. Definition at line 507 of file ocontactaccessbackend_sql.cpp. References m_driver, Opie::DB::OSQLDriver::open(), Opie::DB::OSQLDriver::query(), and update(). Referenced by OContactAccessBackend_SQL(), and reload(). |
|
|
return a List of records that match the regex Implements OContactAccessBackend. Definition at line 661 of file ocontactaccessbackend_sql.cpp. |
|
||||||||||||||||
|
queryByExample for T with the given Settings Implements OPimAccessBackend< OContact >. Definition at line 612 of file ocontactaccessbackend_sql.cpp. References QValueList< T >::begin(), empty, QValueList< T >::end(), extractUids(), OContactAccess::IgnoreCase, QString::isEmpty(), QString::latin1(), QString::left(), QString::length(), list, m_driver, Opie::DB::OSQLDriver::query(), qWarning(), QString::replace(), Opie::DB::OSQLResult::state(), OContact::toMap(), OContactFields::untrfields(), and OContactFields::untrFieldsToId(). |
|
|
Return all possible settings.
Implements OContactAccessBackend. Definition at line 667 of file ocontactaccessbackend_sql.cpp. References OContactAccess::IgnoreCase, and OContactAccess::WildCards. |
|
|
reload the resource Implements OPimAccessBackend< OContact >. Definition at line 524 of file ocontactaccessbackend_sql.cpp. References load(). Referenced by clear(). |
|
|
remove Implements OPimAccessBackend< OContact >. Definition at line 575 of file ocontactaccessbackend_sql.cpp. References m_changed, m_driver, Opie::DB::OSQLDriver::query(), rem, and Opie::DB::OSQLResult::state(). Referenced by replace(). |
|
|
replace a record with T.uid() Implements OPimAccessBackend< OContact >. Definition at line 588 of file ocontactaccessbackend_sql.cpp. |
|
|
Definition at line 924 of file ocontactaccessbackend_sql.cpp. References QValueList< T >::begin(), QTime::elapsed(), empty, QValueList< T >::end(), QMap< Key, T >::insert(), m_driver, Opie::DB::OSQLDriver::query(), qWarning(), Opie::DB::OSQLResult::results(), QTime::start(), and Opie::DB::OSQLResult::state(). Referenced by find(). |
|
|
|
save the resource and all it's changes Implements OPimAccessBackend< OContact >. Definition at line 529 of file ocontactaccessbackend_sql.cpp. References Opie::DB::OSQLDriver::close(), and m_driver. |
|
||||||||||||||||||||
|
FIXME!!! Returns a sorted list of records either ascendinf or descending for a giving criteria and category Implements OContactAccessBackend. Definition at line 721 of file ocontactaccessbackend_sql.cpp. References QTime::elapsed(), empty, extractUids(), list, m_driver, Opie::DB::OSQLDriver::query(), qWarning(), QTime::start(), Opie::DB::OSQLResult::state(), and t. |
|
|
Definition at line 753 of file ocontactaccessbackend_sql.cpp. References QTime::elapsed(), extractUids(), m_changed, m_driver, m_uids, Opie::DB::OSQLDriver::query(), qWarning(), QTime::start(), Opie::DB::OSQLResult::state(), and t. Referenced by load(). |
|
|
Return if database was changed externally. This may just make sense on file based databases like a XML-File. It is used to prevent to overwrite the current database content if the file was already changed by something else ! If this happens, we have to reload before save our data. If we use real databases, this should be handled by the database management system themselve, therefore this function should always return false in this case. It is not our problem to handle this conflict ...
Implements OContactAccessBackend. Definition at line 543 of file ocontactaccessbackend_sql.cpp. |
|
|
Definition at line 103 of file ocontactaccessbackend_sql.h. Referenced by allRecords(), remove(), and update(). |
|
|
Definition at line 107 of file ocontactaccessbackend_sql.h. Referenced by add(), clear(), load(), OContactAccessBackend_SQL(), queryByExample(), remove(), requestCustom(), requestNonCustom(), save(), sorted(), update(), and ~OContactAccessBackend_SQL(). |
|
|
Definition at line 104 of file ocontactaccessbackend_sql.h. Referenced by OContactAccessBackend_SQL(). |
|
|
Definition at line 105 of file ocontactaccessbackend_sql.h. Referenced by add(), allRecords(), and update(). |
1.4.2