summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp77
1 files changed, 35 insertions, 42 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index a5be4c8..d0c8052 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -1,44 +1,33 @@
1/* 1/*
2 This file is part of the Opie Project
3 Copyright (C) The Main Author <main-author@whereever.org>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
29/*
2 * SQL Backend for the OPIE-Contact Database. 30 * SQL Backend for the OPIE-Contact Database.
3 *
4 * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
5 *
6 * =====================================================================
7 *This program is free software; you can redistribute it and/or
8 *modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 * =====================================================================
12 * =====================================================================
13 * Version: $Id$
14 * =====================================================================
15 * History:
16 * $Log$
17 * Revision 1.4 2003/12/22 10:19:26 eilers
18 * Finishing implementation of sql-backend for datebook. But I have to
19 * port the PIM datebook application to use it, before I could debug the
20 * whole stuff.
21 * Thus, PIM-Database backend is finished, but highly experimental. And some
22 * parts are still generic. For instance, the "queryByExample()" methods are
23 * not (or not fully) implemented. Todo: custom-entries not stored.
24 * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular
25 * expression search in the database, which is not supported by sqlite !
26 * Therefore we need either an extended sqlite or a workaround which would
27 * be very slow and memory consuming..
28 *
29 * Revision 1.3 2003/12/08 15:18:10 eilers
30 * Committing unfinished sql implementation before merging to libopie2 starts..
31 *
32 * Revision 1.2 2003/09/29 07:44:26 eilers
33 * Improvement of PIM-SQL Databases, but search queries are still limited.
34 * Addressbook: Changed table layout. Now, we just need 1/3 of disk-space.
35 * Todo: Started to add new attributes. Some type conversions missing.
36 *
37 * Revision 1.1 2003/09/22 14:31:16 eilers
38 * Added first experimental incarnation of sql-backend for addressbook.
39 * Some modifications to be able to compile the todo sql-backend.
40 * A lot of changes fill follow...
41 *
42 */ 31 */
43 32
44#include "ocontactaccessbackend_sql.h" 33#include "ocontactaccessbackend_sql.h"
@@ -50,8 +39,8 @@
50#include <qpe/global.h> 39#include <qpe/global.h>
51#include <qpe/recordfields.h> 40#include <qpe/recordfields.h>
52 41
53#include <opie/ocontactfields.h> 42#include <opie2/ocontactfields.h>
54#include <opie/oconversion.h> 43#include <opie2/oconversion.h>
55#include <opie2/osqldriver.h> 44#include <opie2/osqldriver.h>
56#include <opie2/osqlresult.h> 45#include <opie2/osqlresult.h>
57#include <opie2/osqlmanager.h> 46#include <opie2/osqlmanager.h>
@@ -81,7 +70,7 @@
81 * REMOVE 70 * REMOVE
82 * CLEAR 71 * CLEAR
83 */ 72 */
84namespace { 73namespace Opie {
85 /** 74 /**
86 * CreateQuery for the Todolist Table 75 * CreateQuery for the Todolist Table
87 */ 76 */
@@ -468,6 +457,8 @@ namespace {
468 457
469/* --------------------------------------------------------------------------- */ 458/* --------------------------------------------------------------------------- */
470 459
460namespace Opie {
461
471OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname */, 462OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname */,
472 const QString& filename ): 463 const QString& filename ):
473 OContactAccessBackend(), m_changed(false), m_driver( NULL ) 464 OContactAccessBackend(), m_changed(false), m_driver( NULL )
@@ -940,3 +931,5 @@ QMap<QString, QString> OContactAccessBackend_SQL::requestCustom( int uid ) cons
940 qWarning("RequestCustom needed: %d ms", t.elapsed() ); 931 qWarning("RequestCustom needed: %d ms", t.elapsed() );
941 return customMap; 932 return customMap;
942} 933}
934
935}