summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccesssql.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccesssql.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/libopie2/opiepim/backend/otodoaccesssql.cpp b/libopie2/opiepim/backend/otodoaccesssql.cpp
index 2bcab29..70e40e4 100644
--- a/libopie2/opiepim/backend/otodoaccesssql.cpp
+++ b/libopie2/opiepim/backend/otodoaccesssql.cpp
@@ -301,7 +301,9 @@ namespace {
RemoveQuery::RemoveQuery(int uid )
: OSQLQuery(), m_uid( uid ) {}
+
RemoveQuery::~RemoveQuery() {}
+
QString RemoveQuery::query()const {
QString qu = "DELETE FROM todolist WHERE uid = " + QString::number(m_uid) + " ;";
qu += "DELETE FROM custom_data WHERE uid = " + QString::number(m_uid);
@@ -312,18 +314,26 @@ namespace {
ClearQuery::ClearQuery()
: OSQLQuery() {}
ClearQuery::~ClearQuery() {}
- QString ClearQuery::query()const {
+ QString ClearQuery::query()const
+ {
QString qu = "drop table todolist";
return qu;
}
+
FindQuery::FindQuery(int uid)
- : OSQLQuery(), m_uid(uid ) {
+ : OSQLQuery(), m_uid(uid )
+ {
}
+
FindQuery::FindQuery(const QArray<int>& ints)
- : OSQLQuery(), m_uids(ints){
+ : OSQLQuery(), m_uids(ints)
+ {
}
- FindQuery::~FindQuery() {
+
+ FindQuery::~FindQuery()
+ {
}
+
QString FindQuery::query()const{
if (m_uids.count() == 0 )
return single();
@@ -448,10 +458,10 @@ QArray<int> OPimTodoAccessBackendSQL::allRecords()const {
return m_uids;
}
-QArray<int> OPimTodoAccessBackendSQL::queryByExample( const OPimTodo& , int, const QDateTime& ){
- QArray<int> ints(0);
- return ints;
-}
+// QArray<int> OPimTodoAccessBackendSQL::queryByExample( const UIDArray& uidlist, const OPimTodo& , int, const QDateTime& ){
+// QArray<int> ints(0);
+// return ints;
+// }
OPimTodo OPimTodoAccessBackendSQL::find(int uid ) const{
FindQuery query( uid );
return parseResultAndCache( uid, m_driver->query(&query) );
@@ -619,7 +629,7 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder,
bool OPimTodoAccessBackendSQL::date( QDate& da, const QString& str ) const{
- if ( str == "0-0-0" )
+ if ( str == "0000-00-00" )
return false;
else{
int day, year, month;