harvester/contentinfodb/src/contentinfodbupdate.cpp
author hgs
Tue, 05 Oct 2010 13:15:12 +0530
changeset 23 d4d56f5e7c55
permissions -rw-r--r--
201039
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
 * All rights reserved.
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
 *
hgs
parents:
diff changeset
     9
 * Initial Contributors:
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
 *
hgs
parents:
diff changeset
    12
 * Contributors:
hgs
parents:
diff changeset
    13
 *
hgs
parents:
diff changeset
    14
 * Description:  update api for contentinfodb 
hgs
parents:
diff changeset
    15
 *
hgs
parents:
diff changeset
    16
 */
hgs
parents:
diff changeset
    17
#include "contentinfodbupdate.h"
hgs
parents:
diff changeset
    18
#include "contentinfodbparser.h"
hgs
parents:
diff changeset
    19
#include "contentinfodb.h"
hgs
parents:
diff changeset
    20
#include "cpixcontentinfodbdef.h"
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    23
// ContentInfoDbUpdate::ContentInfoDbUpdate()
hgs
parents:
diff changeset
    24
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    25
//
hgs
parents:
diff changeset
    26
ContentInfoDbUpdate::ContentInfoDbUpdate() :
hgs
parents:
diff changeset
    27
    iParser(NULL),mdb(NULL)
hgs
parents:
diff changeset
    28
    {
hgs
parents:
diff changeset
    29
    mdb = ContentInfoDb::instance();
hgs
parents:
diff changeset
    30
    iParser = new ContentInfoDbParser();
hgs
parents:
diff changeset
    31
    if (iParser)
hgs
parents:
diff changeset
    32
        {
hgs
parents:
diff changeset
    33
        connect(iParser, SIGNAL(categoryDetails(QMap<QString,QString>)),
hgs
parents:
diff changeset
    34
                this, SLOT(slotupdateCategoryInfo(QMap<QString,QString>)));
hgs
parents:
diff changeset
    35
        connect(iParser, SIGNAL(actionUri(QMap<QString,QString>)), this,
hgs
parents:
diff changeset
    36
                SLOT(slotupdateUri(QMap<QString,QString>)));
hgs
parents:
diff changeset
    37
        connect(iParser, SIGNAL(filedMapping(QString,QStringList)), this,
hgs
parents:
diff changeset
    38
                SLOT(slotupdateFieldmapping(QString,QStringList)));
hgs
parents:
diff changeset
    39
        connect(iParser, SIGNAL(firstLineMapping(QStringList)), this,
hgs
parents:
diff changeset
    40
                SLOT(slotfirstLineMapping(QStringList)));
hgs
parents:
diff changeset
    41
        connect(iParser, SIGNAL(relevancyMapping(QString,QString)), this,
hgs
parents:
diff changeset
    42
                SLOT(slotrelevancyMapping(QString,QString)));
hgs
parents:
diff changeset
    43
        }
hgs
parents:
diff changeset
    44
    counter = 0;
hgs
parents:
diff changeset
    45
    }
hgs
parents:
diff changeset
    46
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    47
// ContentInfoDbUpdate::~ContentInfoDbUpdate()
hgs
parents:
diff changeset
    48
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    49
//
hgs
parents:
diff changeset
    50
ContentInfoDbUpdate::~ContentInfoDbUpdate()
hgs
parents:
diff changeset
    51
    {
hgs
parents:
diff changeset
    52
    ContentInfoDb::deleteinstance();
hgs
parents:
diff changeset
    53
    }
hgs
parents:
diff changeset
    54
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    55
// ContentInfoDbUpdate::UpdateDb()
hgs
parents:
diff changeset
    56
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    57
//
hgs
parents:
diff changeset
    58
bool ContentInfoDbUpdate::UpdateDb(QString xmlpath)
hgs
parents:
diff changeset
    59
    {
hgs
parents:
diff changeset
    60
    if (mdb)
hgs
parents:
diff changeset
    61
       (void)mdb->Open();
hgs
parents:
diff changeset
    62
    if (iParser)
hgs
parents:
diff changeset
    63
        {
hgs
parents:
diff changeset
    64
        primarykey = QString();
hgs
parents:
diff changeset
    65
        return iParser->parse(xmlpath);
hgs
parents:
diff changeset
    66
        }
hgs
parents:
diff changeset
    67
    return false;
hgs
parents:
diff changeset
    68
    }
hgs
parents:
diff changeset
    69
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    70
// ContentInfoDbUpdate::UpdateBlacklisted()
hgs
parents:
diff changeset
    71
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    72
//
hgs
parents:
diff changeset
    73
bool ContentInfoDbUpdate::UpdateBlacklisted(QString primarykey, int value)
hgs
parents:
diff changeset
    74
    {
hgs
parents:
diff changeset
    75
    if (mdb)
hgs
parents:
diff changeset
    76
        (void)mdb->Open();
hgs
parents:
diff changeset
    77
    QString query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg(
hgs
parents:
diff changeset
    78
            BLACKLISTSTATUS).arg(value).arg(TAGPRIMARYKEY).arg(primarykey);
hgs
parents:
diff changeset
    79
    if (!mdb->writeData(query))
hgs
parents:
diff changeset
    80
        return false;
hgs
parents:
diff changeset
    81
    return true;
hgs
parents:
diff changeset
    82
    }
hgs
parents:
diff changeset
    83
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    84
// ContentInfoDbUpdate::UpdateIndexStatus()
hgs
parents:
diff changeset
    85
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    86
//
hgs
parents:
diff changeset
    87
bool ContentInfoDbUpdate::UpdateIndexStatus(QString primarykey, int value)
hgs
parents:
diff changeset
    88
    {
hgs
parents:
diff changeset
    89
    if (mdb)
hgs
parents:
diff changeset
    90
        (void)mdb->Open();
hgs
parents:
diff changeset
    91
    QString query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg(
hgs
parents:
diff changeset
    92
            INDEXINGSTATUS).arg(value).arg(TAGPRIMARYKEY).arg(primarykey);
hgs
parents:
diff changeset
    93
    if (!mdb->writeData(query))
hgs
parents:
diff changeset
    94
        return false;
hgs
parents:
diff changeset
    95
    return true;
hgs
parents:
diff changeset
    96
    }
hgs
parents:
diff changeset
    97
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
    98
// ContentInfoDbUpdate::InsertPrimaryKey()
hgs
parents:
diff changeset
    99
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   100
//
hgs
parents:
diff changeset
   101
QString ContentInfoDbUpdate::InsertPrimaryKey(QString tableName,
hgs
parents:
diff changeset
   102
        QString tagName, QMap<QString, QString> data)
hgs
parents:
diff changeset
   103
    {
hgs
parents:
diff changeset
   104
    QMapIterator<QString, QString> i(data);
hgs
parents:
diff changeset
   105
    QString query;
hgs
parents:
diff changeset
   106
    QString p_key;
hgs
parents:
diff changeset
   107
    while (i.hasNext())
hgs
parents:
diff changeset
   108
        {
hgs
parents:
diff changeset
   109
        i.next();
hgs
parents:
diff changeset
   110
        if (i.key() == tagName)
hgs
parents:
diff changeset
   111
            {
hgs
parents:
diff changeset
   112
            p_key = i.value();
hgs
parents:
diff changeset
   113
            break;
hgs
parents:
diff changeset
   114
            }
hgs
parents:
diff changeset
   115
        }
hgs
parents:
diff changeset
   116
    query = QString(QUERYINSERTROW).arg(tableName).arg(tagName).arg(p_key);
hgs
parents:
diff changeset
   117
    mdb->writeData(query);
hgs
parents:
diff changeset
   118
    return p_key;
hgs
parents:
diff changeset
   119
    }
hgs
parents:
diff changeset
   120
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   121
// ContentInfoDbUpdate::slotupdateCategoryInfo()
hgs
parents:
diff changeset
   122
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   123
//
hgs
parents:
diff changeset
   124
void ContentInfoDbUpdate::slotupdateCategoryInfo(QMap<QString, QString> map)
hgs
parents:
diff changeset
   125
    {
hgs
parents:
diff changeset
   126
    QString query;
hgs
parents:
diff changeset
   127
    QString p_key = InsertPrimaryKey(MAINTABLENAME, TAGPRIMARYKEY, map);
hgs
parents:
diff changeset
   128
    primarykey = p_key;
hgs
parents:
diff changeset
   129
    if (p_key.length())
hgs
parents:
diff changeset
   130
        {
hgs
parents:
diff changeset
   131
        QMapIterator<QString, QString> i(map);
hgs
parents:
diff changeset
   132
        while (i.hasNext())
hgs
parents:
diff changeset
   133
            {
hgs
parents:
diff changeset
   134
            i.next();
hgs
parents:
diff changeset
   135
            if (i.key() != TAGPRIMARYKEY)
hgs
parents:
diff changeset
   136
                {
hgs
parents:
diff changeset
   137
                query = QString();
hgs
parents:
diff changeset
   138
                if ((i.key() == TAGACTIONURI) || (i.key() == TAGFIELDMAP)
hgs
parents:
diff changeset
   139
                        || (i.key() == TAGRELEVANCY) || (i.key()
hgs
parents:
diff changeset
   140
                        == TAGRESULTFIRSTLINE))
hgs
parents:
diff changeset
   141
                    {
hgs
parents:
diff changeset
   142
                    counter++;
hgs
parents:
diff changeset
   143
                    QString tablename = QString(DYNAMICTABLE).arg(counter);
hgs
parents:
diff changeset
   144
                    query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg(
hgs
parents:
diff changeset
   145
                            i.key()).arg(tablename).arg(TAGPRIMARYKEY).arg(
hgs
parents:
diff changeset
   146
                            p_key);
hgs
parents:
diff changeset
   147
                    }
hgs
parents:
diff changeset
   148
                else
hgs
parents:
diff changeset
   149
                    {
hgs
parents:
diff changeset
   150
                    query = QString(QUERYUPDATEDATA).arg(MAINTABLENAME).arg(
hgs
parents:
diff changeset
   151
                            i.key()).arg(i.value()).arg(TAGPRIMARYKEY).arg(
hgs
parents:
diff changeset
   152
                            p_key);
hgs
parents:
diff changeset
   153
                    }
hgs
parents:
diff changeset
   154
                if (!mdb->writeData(query))
hgs
parents:
diff changeset
   155
                    {
hgs
parents:
diff changeset
   156
                    
hgs
parents:
diff changeset
   157
                    }                
hgs
parents:
diff changeset
   158
                }
hgs
parents:
diff changeset
   159
            }
hgs
parents:
diff changeset
   160
        }
hgs
parents:
diff changeset
   161
    }
hgs
parents:
diff changeset
   162
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   163
// ContentInfoDbUpdate::slotupdateUri()
hgs
parents:
diff changeset
   164
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   165
//
hgs
parents:
diff changeset
   166
void ContentInfoDbUpdate::slotupdateUri(QMap<QString, QString> map)
hgs
parents:
diff changeset
   167
    {
hgs
parents:
diff changeset
   168
    //get actionuri table name
hgs
parents:
diff changeset
   169
    QString query = QString(QUERYDATARETRIVAL).arg(TAGACTIONURI).arg(
hgs
parents:
diff changeset
   170
            MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey);
hgs
parents:
diff changeset
   171
    QString actionuritablename = mdb->readStringData(query);
hgs
parents:
diff changeset
   172
hgs
parents:
diff changeset
   173
    if (actionuritablename.length())
hgs
parents:
diff changeset
   174
        {
hgs
parents:
diff changeset
   175
        query = QString();
hgs
parents:
diff changeset
   176
        query = QString(QUERYCREATEACTIONURITABLE).arg(actionuritablename);
hgs
parents:
diff changeset
   177
        mdb->createTable(actionuritablename, query);
hgs
parents:
diff changeset
   178
        QString p_key = InsertPrimaryKey(actionuritablename,
hgs
parents:
diff changeset
   179
                TAGACTIONURISTRING, map);
hgs
parents:
diff changeset
   180
        if (p_key.length())
hgs
parents:
diff changeset
   181
            {
hgs
parents:
diff changeset
   182
            QMapIterator<QString, QString> i(map);
hgs
parents:
diff changeset
   183
            while (i.hasNext())
hgs
parents:
diff changeset
   184
                {
hgs
parents:
diff changeset
   185
                i.next();
hgs
parents:
diff changeset
   186
                if (i.key() != TAGACTIONURISTRING)
hgs
parents:
diff changeset
   187
                    {
hgs
parents:
diff changeset
   188
                    query = QString();
hgs
parents:
diff changeset
   189
                    query
hgs
parents:
diff changeset
   190
                            = QString(QUERYUPDATEDATA).arg(actionuritablename).arg(
hgs
parents:
diff changeset
   191
                                    i.key()).arg(i.value()).arg(
hgs
parents:
diff changeset
   192
                                    TAGACTIONURISTRING).arg(p_key);
hgs
parents:
diff changeset
   193
                    if (!mdb->writeData(query))
hgs
parents:
diff changeset
   194
                        {
hgs
parents:
diff changeset
   195
                        
hgs
parents:
diff changeset
   196
                        }   
hgs
parents:
diff changeset
   197
                    }
hgs
parents:
diff changeset
   198
                }
hgs
parents:
diff changeset
   199
            }
hgs
parents:
diff changeset
   200
        }
hgs
parents:
diff changeset
   201
    }
hgs
parents:
diff changeset
   202
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   203
// ContentInfoDbUpdate::slotupdateFieldmapping()
hgs
parents:
diff changeset
   204
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   205
//
hgs
parents:
diff changeset
   206
void ContentInfoDbUpdate::slotupdateFieldmapping(QString key,
hgs
parents:
diff changeset
   207
        QStringList value)
hgs
parents:
diff changeset
   208
    {
hgs
parents:
diff changeset
   209
    //get fieldmap table name from maintable
hgs
parents:
diff changeset
   210
    QString query = QString(QUERYDATARETRIVAL).arg(TAGFIELDMAP).arg(
hgs
parents:
diff changeset
   211
            MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey);
hgs
parents:
diff changeset
   212
    QString fieldtablename = mdb->readStringData(query);
hgs
parents:
diff changeset
   213
hgs
parents:
diff changeset
   214
    if (fieldtablename.length())
hgs
parents:
diff changeset
   215
        {
hgs
parents:
diff changeset
   216
        // create a table for fieldmap 
hgs
parents:
diff changeset
   217
        query = QString();
hgs
parents:
diff changeset
   218
        query = QString(QUERYCREATEFIELDMAPTABLE).arg(fieldtablename);
hgs
parents:
diff changeset
   219
        mdb->createTable(fieldtablename, query);
hgs
parents:
diff changeset
   220
hgs
parents:
diff changeset
   221
        // insert the field in filedmap table
hgs
parents:
diff changeset
   222
        query = QString();
hgs
parents:
diff changeset
   223
        query
hgs
parents:
diff changeset
   224
                = QString(QUERYINSERTROW).arg(fieldtablename).arg(TAGFIELD).arg(
hgs
parents:
diff changeset
   225
                        key);
hgs
parents:
diff changeset
   226
        mdb->writeData(query);
hgs
parents:
diff changeset
   227
            {
hgs
parents:
diff changeset
   228
            
hgs
parents:
diff changeset
   229
            }
hgs
parents:
diff changeset
   230
hgs
parents:
diff changeset
   231
        counter++;
hgs
parents:
diff changeset
   232
        query = QString();
hgs
parents:
diff changeset
   233
hgs
parents:
diff changeset
   234
        QString tablename = QString(DYNAMICTABLE).arg(counter);
hgs
parents:
diff changeset
   235
hgs
parents:
diff changeset
   236
        // enter the value as table name second column in field map will refer to another table
hgs
parents:
diff changeset
   237
        query
hgs
parents:
diff changeset
   238
                = QString(QUERYUPDATEDATA).arg(fieldtablename).arg(TAGURILIST).arg(
hgs
parents:
diff changeset
   239
                        tablename).arg(TAGFIELD).arg(key);
hgs
parents:
diff changeset
   240
        if (!mdb->writeData(query))
hgs
parents:
diff changeset
   241
            {
hgs
parents:
diff changeset
   242
            
hgs
parents:
diff changeset
   243
            }
hgs
parents:
diff changeset
   244
hgs
parents:
diff changeset
   245
        query = QString();
hgs
parents:
diff changeset
   246
        // creating a table for the field map values 
hgs
parents:
diff changeset
   247
        query = QString(QUERYCREATEFIELDMAPSUBTABLE).arg(tablename);
hgs
parents:
diff changeset
   248
        mdb->createTable(tablename, query);
hgs
parents:
diff changeset
   249
hgs
parents:
diff changeset
   250
        for (int i = 0; i < value.count(); i++)
hgs
parents:
diff changeset
   251
            {
hgs
parents:
diff changeset
   252
            query = QString();
hgs
parents:
diff changeset
   253
            // inserting the uri list mapped for a particular field
hgs
parents:
diff changeset
   254
            query = QString(QUERYINSERTROW).arg(tablename).arg(TAGAURI).arg(
hgs
parents:
diff changeset
   255
                    value[i]);
hgs
parents:
diff changeset
   256
            if (!mdb->writeData(query))
hgs
parents:
diff changeset
   257
                {
hgs
parents:
diff changeset
   258
            
hgs
parents:
diff changeset
   259
                }
hgs
parents:
diff changeset
   260
            }
hgs
parents:
diff changeset
   261
        }
hgs
parents:
diff changeset
   262
    }
hgs
parents:
diff changeset
   263
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   264
// ContentInfoDbUpdate::slotfirstLineMapping()
hgs
parents:
diff changeset
   265
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   266
//
hgs
parents:
diff changeset
   267
void ContentInfoDbUpdate::slotfirstLineMapping(QStringList list)
hgs
parents:
diff changeset
   268
    {
hgs
parents:
diff changeset
   269
    //get actionuri table name
hgs
parents:
diff changeset
   270
    QString query = QString(QUERYDATARETRIVAL).arg(TAGRESULTFIRSTLINE).arg(
hgs
parents:
diff changeset
   271
            MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey);
hgs
parents:
diff changeset
   272
    QString firstlinetablename = mdb->readStringData(query);
hgs
parents:
diff changeset
   273
hgs
parents:
diff changeset
   274
    if (firstlinetablename.length())
hgs
parents:
diff changeset
   275
        {
hgs
parents:
diff changeset
   276
        query = QString();
hgs
parents:
diff changeset
   277
        query = QString(QUERYCREATEFIRSTLINETABLE).arg(firstlinetablename);
hgs
parents:
diff changeset
   278
        mdb->createTable(firstlinetablename, query);
hgs
parents:
diff changeset
   279
hgs
parents:
diff changeset
   280
        for (int i = 0; i < list.count(); i++)
hgs
parents:
diff changeset
   281
            {
hgs
parents:
diff changeset
   282
            query = QString();
hgs
parents:
diff changeset
   283
            // inserting the uri list mapped for a particular field
hgs
parents:
diff changeset
   284
            query = QString(QUERYINSERTROW).arg(firstlinetablename).arg(
hgs
parents:
diff changeset
   285
                    TAGFIELD).arg(list[i]);
hgs
parents:
diff changeset
   286
            if (!mdb->writeData(query))
hgs
parents:
diff changeset
   287
                {
hgs
parents:
diff changeset
   288
                
hgs
parents:
diff changeset
   289
                }
hgs
parents:
diff changeset
   290
            }
hgs
parents:
diff changeset
   291
        }
hgs
parents:
diff changeset
   292
    }
hgs
parents:
diff changeset
   293
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   294
// ContentInfoDbUpdate::slotrelevancyMapping()
hgs
parents:
diff changeset
   295
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   296
//
hgs
parents:
diff changeset
   297
void ContentInfoDbUpdate::slotrelevancyMapping(QString field,
hgs
parents:
diff changeset
   298
        QString boostvalue)
hgs
parents:
diff changeset
   299
    {
hgs
parents:
diff changeset
   300
    QString query = QString(QUERYDATARETRIVAL).arg(TAGRELEVANCY).arg(
hgs
parents:
diff changeset
   301
            MAINTABLENAME).arg(TAGPRIMARYKEY).arg(primarykey);
hgs
parents:
diff changeset
   302
    QString relevancytablename = mdb->readStringData(query);
hgs
parents:
diff changeset
   303
    if (relevancytablename.length())
hgs
parents:
diff changeset
   304
        {
hgs
parents:
diff changeset
   305
        query = QString();
hgs
parents:
diff changeset
   306
        query = QString(QUERYCREATERELEVANCYTABLE).arg(relevancytablename);
hgs
parents:
diff changeset
   307
        mdb->createTable(relevancytablename, query);
hgs
parents:
diff changeset
   308
hgs
parents:
diff changeset
   309
        query = QString();
hgs
parents:
diff changeset
   310
        // inserting field name as a primary key
hgs
parents:
diff changeset
   311
        query
hgs
parents:
diff changeset
   312
                = QString(QUERYINSERTROW).arg(relevancytablename).arg(
hgs
parents:
diff changeset
   313
                        TAGFIELD).arg(field);
hgs
parents:
diff changeset
   314
hgs
parents:
diff changeset
   315
        if (!mdb->writeData(query))
hgs
parents:
diff changeset
   316
            {
hgs
parents:
diff changeset
   317
hgs
parents:
diff changeset
   318
            }
hgs
parents:
diff changeset
   319
        query = QString();
hgs
parents:
diff changeset
   320
        // updating the row with boostvalue
hgs
parents:
diff changeset
   321
        query = QString(QUERYUPDATEDATA).arg(relevancytablename).arg(
hgs
parents:
diff changeset
   322
                TAGBOOSTVALUE).arg(boostvalue).arg(TAGFIELD).arg(field);
hgs
parents:
diff changeset
   323
        if (!mdb->writeData(query))
hgs
parents:
diff changeset
   324
            {
hgs
parents:
diff changeset
   325
hgs
parents:
diff changeset
   326
            }
hgs
parents:
diff changeset
   327
        }
hgs
parents:
diff changeset
   328
    }
hgs
parents:
diff changeset
   329
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   330
// ContentInfoDbUpdate::slotrelevancyMapping()
hgs
parents:
diff changeset
   331
// ---------------------------------------------------------------------------
hgs
parents:
diff changeset
   332
//
hgs
parents:
diff changeset
   333
void ContentInfoDbUpdate::deleteCategory(QString Key)
hgs
parents:
diff changeset
   334
    {
hgs
parents:
diff changeset
   335
    if (mdb)
hgs
parents:
diff changeset
   336
        (void)mdb->Open();
hgs
parents:
diff changeset
   337
    mdb->writeData(QString(QUERYDELETE).arg(Key));
hgs
parents:
diff changeset
   338
    }