summaryrefslogtreecommitdiff
path: root/libopie2/opiedb
authoreilers <eilers>2004-08-29 12:42:03 (UTC)
committer eilers <eilers>2004-08-29 12:42:03 (UTC)
commitdd159675e6e3c361bc20eaa6994265e73b6599ef (patch) (side-by-side diff)
tree70cf91b669307ae39e020ce4257b60b2de9acd42 /libopie2/opiedb
parent496157cb35b8f90e73770fc43c9a63534baebf33 (diff)
downloadopie-dd159675e6e3c361bc20eaa6994265e73b6599ef.zip
opie-dd159675e6e3c361bc20eaa6994265e73b6599ef.tar.gz
opie-dd159675e6e3c361bc20eaa6994265e73b6599ef.tar.bz2
Minor but important changes in API. Improved SQL performance: contactsbackend now
supports look-ahead caching to speed up access. Fixed and improved look-ahead cache in todo-backend. Datebook backend will follow, soon !
Diffstat (limited to 'libopie2/opiedb') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqlresult.cpp8
-rw-r--r--libopie2/opiedb/osqlresult.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/libopie2/opiedb/osqlresult.cpp b/libopie2/opiedb/osqlresult.cpp
index bad7d8b..268ac8e 100644
--- a/libopie2/opiedb/osqlresult.cpp
+++ b/libopie2/opiedb/osqlresult.cpp
@@ -22,27 +22,27 @@ OSQLResultItem &OSQLResultItem::operator=( const OSQLResultItem& other) {
OSQLResultItem::TableString OSQLResultItem::tableString()const{
return m_string;
}
OSQLResultItem::TableInt OSQLResultItem::tableInt()const {
return m_int;
}
-QString OSQLResultItem::data( const QString& columnName, bool *ok ) {
- TableString::Iterator it = m_string.find( columnName );
+QString OSQLResultItem::data( const QString& columnName, bool *ok ) const {
+ TableString::ConstIterator it = m_string.find( columnName );
/* if found */
if ( it != m_string.end() ) {
if ( ok ) *ok = true;
return it.data();
}else{
if ( ok ) *ok = false;
return QString::null;
}
}
-QString OSQLResultItem::data( int column, bool *ok ) {
- TableInt::Iterator it = m_int.find( column );
+QString OSQLResultItem::data( int column, bool *ok ) const {
+ TableInt::ConstIterator it = m_int.find( column );
/* if found */
if ( it != m_int.end() ) {
if ( ok ) *ok = true;
return it.data();
}else{
diff --git a/libopie2/opiedb/osqlresult.h b/libopie2/opiedb/osqlresult.h
index fc6f01a..92b65a0 100644
--- a/libopie2/opiedb/osqlresult.h
+++ b/libopie2/opiedb/osqlresult.h
@@ -48,18 +48,18 @@ public:
TableInt tableInt() const;
/**
* retrieves the Data from columnName
*
*/
- QString data( const QString& columnName, bool *ok = 0);
+ QString data( const QString& columnName, bool *ok = 0) const;
/**
* QString for column number
*/
- QString data(int columnNumber, bool *ok = 0);
+ QString data(int columnNumber, bool *ok = 0) const;
/**
* Date conversion from columnName
*/
QDate dataToDate( const QString& columnName, bool *ok = 0 );