Changeset c790268 for src/mvc/event.h


Ignore:
Timestamp:
01/17/10 17:22:03 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
6f39595
Parents:
680a4da
Message:

implemented JOINing two tables

  • modified 'ormrecord' to support JOINing two tables
  • modified 'event' accordingly, since its items/columns are splitted into two separate tables
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.h

    r680a4da rc790268  
    1919public:
    2020    static QSqlRecord const sColumns;
    21     static QString const sTableName;
     21    //static QString const sTableName;
     22    static QString const sTable1Name;
     23    static QString const sTable2Name;
     24    static int const sTable1ColCount;
     25    static int const sTable2ColCount;
    2226
    2327public:
     
    2630
    2731public:
     32    // Table 1
    2833    int id() const { return value("id").toInt(); }
    2934    int conferenceId() const { return value("xid_conference").toInt(); }
     
    3439    QString language() const { return value("language").toString(); }
    3540    bool isFavourite() const { return value("favourite").toBool(); }
     41    // Table 2 : virtual table for FTS (Full Text Search)
     42    QString tag() const { return value("tag").toString(); }
     43    QString title() const { return value("title").toString(); }
     44    QString subtitle() const { return value("subtitle").toString(); }
     45    QString abstract() const { return value("abstract").toString(); }
     46    QString description() const { return value("description").toString(); }
    3647
     48    // Table 1
    3749    void setId(int id) { setValue("id", id); }
    3850    void setConferenceId(int conferenceId) { setValue("xid_conference", conferenceId); }
     
    4355    void setLanguage(const QString& language) { setValue("language", language); }
    4456    void setFavourite(bool favourite) { setValue("favourite", favourite); }
     57    // Table 2 : virtual table for FTS (Full Text Search)
     58    void setTag(const QString& tag) { setValue("tag", tag); }
     59    void setTitle(const QString& title) { setValue("title", title); }
     60    void setSubtitle(const QString& subtitle) { setValue("subtitle", subtitle); }
     61    void setAbstract(const QString& abstract) { setValue("abstract", abstract); }
     62    void setDescription(const QString& description) { setValue("description", description); }
    4563
    4664friend class EventTest;
Note: See TracChangeset for help on using the changeset viewer.