Ignore:
Timestamp:
01/18/10 12:46:43 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
6ae1026
Parents:
8f25cb1
Message:

used 'MAEMO' define to create 'non-virtual' 'VIRUAL_EVENT' table
instead of 'virtual' one, only for 'MAEMO'
Linux stays untouched - creates real 'virtual' table for FTS support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r8f25cb1 r84b9c07  
    234234            FOREIGN KEY(xid_activity) REFERENCES ACTIVITY(id))");
    235235
    236         // TBD Virtual tables compatibility (waiting for Marek). Temporary non virtual VIRTUAL_TABLE below: To be deleted
    237 /*        query.exec("CREATE VIRTUAL TABLE VIRTUAL_EVENT using fts3 ( \
    238             xid_conference INTEGER  NOT NULL, \
    239             id INTEGER NOT NULL , \
    240             tag VARCHAR,title VARCHAR NOT NULL , \
    241             subtitle VARCHAR, \
    242             abstract VARCHAR, \
    243             description VARCHAR, \
    244             PRIMARY KEY (xid_conference,id))");
    245 */
     236#ifdef MAEMO
     237        // TBD: MAEMO Virtual tables compatibility (waiting for Marek).
     238        // MAEMO sqlite Qt driver doesn't provide FTS support by default - use the following HACK
     239        qDebug() << "MAEMO: Creating 'general', not 'virtual' table 'VIRTUAL_EVENT'";
    246240        query.exec("CREATE TABLE VIRTUAL_EVENT ( \
    247241            xid_conference INTEGER  NOT NULL, \
     
    252246            description VARCHAR, \
    253247            PRIMARY KEY (xid_conference,id))");
     248#else
     249        query.exec("CREATE VIRTUAL TABLE VIRTUAL_EVENT using fts3 ( \
     250            xid_conference INTEGER  NOT NULL, \
     251            id INTEGER NOT NULL , \
     252            tag VARCHAR,title VARCHAR NOT NULL , \
     253            subtitle VARCHAR, \
     254            abstract VARCHAR, \
     255            description VARCHAR, \
     256            PRIMARY KEY (xid_conference,id))");
     257#endif
    254258
    255259        query.exec("CREATE TABLE EVENT_PERSON ( \
Note: See TracChangeset for help on using the changeset viewer.