OContactAccessBackend_SQL Class Reference
This class is the SQL implementation of a Contact backend it does implement everything available for OContact. More...
#include <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 () |
| save the resource and all it's changes | |
| bool | load () |
| load the resource | |
| void | clear () |
| clear the back end | |
| bool | wasChangedExternally () |
| Return if database was changed externally. | |
| QArray< int > | allRecords () const |
| return an array of all available uids | |
| OContact | find (int uid) const |
| find the OPimRecord with uid | |
| QArray< int > | queryByExample (const OContact &query, int settings, const QDateTime &d) |
| queryByExample for T with the given Settings | |
| QArray< int > | matchRegexp (const QRegExp &r) const |
| return a List of records that match the regex | |
| const uint | querySettings () |
| Return all possible settings. | |
| bool | hasQuerySettings (uint querySettings) const |
| Check whether settings are correct. | |
| QArray< int > | sorted (bool asc, int, int, int) |
| FIXME!!! Returns a sorted list of records either ascendinf or descending for a giving criteria and category. | |
| bool | add (const OContact &newcontact) |
| add T | |
| bool | replace (const OContact &contact) |
| replace a record with T.uid() | |
| bool | remove (int uid) |
| remove | |
| bool | reload () |
| reload the resource | |
Protected Attributes | |
| bool | m_changed |
| QString | m_fileName |
| QArray< int > | m_uids |
| OSQLDriver * | m_driver |
Detailed Description
This class is the SQL implementation of a Contact backend it does implement everything available for OContact.
- See also:
- OPimAccessBackend for more information of available methods
Definition at line 49 of file ocontactaccessbackend_sql.h.
Constructor & Destructor Documentation
|
||||||||||||
|
Definition at line 471 of file ocontactaccessbackend_sql.cpp. References Global::applicationFileName(), QTime::elapsed(), load(), m_driver, m_fileName, and QTime::start(). |
|
|
Definition at line 495 of file ocontactaccessbackend_sql.cpp. References m_driver. |
Member Function Documentation
|
|
save the resource and all it's changes
Implements OPimAccessBackend< OContact >. Definition at line 523 of file ocontactaccessbackend_sql.cpp. References m_driver. |
|
|
load the resource
Implements OPimAccessBackend< OContact >. Definition at line 501 of file ocontactaccessbackend_sql.cpp. References m_driver. Referenced by OContactAccessBackend_SQL(), and reload(). |
|
|
clear the back end
Implements OPimAccessBackend< OContact >. Definition at line 529 of file ocontactaccessbackend_sql.cpp. |
|
|
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 537 of file ocontactaccessbackend_sql.cpp. |
|
|
return an array of all available uids
Implements OPimAccessBackend< OContact >. Definition at line 542 of file ocontactaccessbackend_sql.cpp. |
|
|
find the OPimRecord with uid
Implements OPimAccessBackend< OContact >. Definition at line 591 of file ocontactaccessbackend_sql.cpp. References QTime::elapsed(), OPimRecord::setExtraMap(), and QTime::start(). |
|
||||||||||||||||
|
queryByExample for T with the given Settings
Implements OPimAccessBackend< OContact >. Definition at line 606 of file ocontactaccessbackend_sql.cpp. References QValueList::begin(), QValueList::end(), QString::isEmpty(), QString::latin1(), QString::left(), QString::length(), m_driver, QString::replace(), OContact::toMap(), OContactFields::untrfields(), and OContactFields::untrFieldsToId(). |
|
|
return a List of records that match the regex
Implements OContactAccessBackend. Definition at line 655 of file ocontactaccessbackend_sql.cpp. |
|
|
Return all possible settings.
Implements OContactAccessBackend. Definition at line 661 of file ocontactaccessbackend_sql.cpp. |
|
|
Check whether settings are correct.
Implements OContactAccessBackend. Definition at line 667 of file ocontactaccessbackend_sql.cpp. |
|
||||||||||||||||||||
|
FIXME!!! Returns a sorted list of records either ascendinf or descending for a giving criteria and category.
Implements OContactAccessBackend. Definition at line 715 of file ocontactaccessbackend_sql.cpp. References QTime::elapsed(), m_driver, and QTime::start(). |
|
|
add T
Implements OPimAccessBackend< OContact >. Definition at line 553 of file ocontactaccessbackend_sql.cpp. References QArray< int >::count(), m_driver, m_uids, QArray< int >::resize(), and Qtopia::Record::uid(). Referenced by replace(). |
|
|
replace a record with T.uid()
Implements OPimAccessBackend< OContact >. Definition at line 582 of file ocontactaccessbackend_sql.cpp. References add(), remove(), and Qtopia::Record::uid(). |
|
|
remove
Implements OPimAccessBackend< OContact >. Definition at line 569 of file ocontactaccessbackend_sql.cpp. References m_changed, and m_driver. Referenced by replace(). |
|
|
reload the resource
Implements OPimAccessBackend< OContact >. Definition at line 518 of file ocontactaccessbackend_sql.cpp. References load(). Referenced by clear(). |
Member Data Documentation
|
|
Definition at line 94 of file ocontactaccessbackend_sql.h. Referenced by allRecords(), and remove(). |
|
|
Definition at line 95 of file ocontactaccessbackend_sql.h. Referenced by OContactAccessBackend_SQL(). |
|
|
Definition at line 96 of file ocontactaccessbackend_sql.h. Referenced by add(), and allRecords(). |
|
|
Definition at line 98 of file ocontactaccessbackend_sql.h. Referenced by add(), clear(), load(), OContactAccessBackend_SQL(), queryByExample(), remove(), save(), sorted(), and ~OContactAccessBackend_SQL(). |
The documentation for this class was generated from the following files:
