source: src/orm/sqlcondition.h @ 5a73d27

qt5
Last change on this file since 5a73d27 was 5a73d27, checked in by komarma <komarma@…>, 12 years ago

Adding orm module

  • Property mode set to 100644
File size: 2.1 KB
Line 
1#ifndef SQLCONDITION_H
2#define SQLCONDITION_H
3
4//#include <QVariant>
5
6//class SqlCondition
7//{
8//public:
9//    enum Operator { eq = 0, ne, gt, ge, lt, le };
10//
11//public:
12//    SqlCondition(const QLatin1String& column, Operator op, const QVariant& value) :
13//            mColumn(column), mValue(value), mOperator(op) {}
14//
15//    virtual QString toString() const;
16//private:
17//    QLatin1String mColumn;
18//    QVariant mValue;
19//    Operator mOperator;
20//
21//private:
22//    static char* sOperatorNames[];
23//};
24//
25//class SqlAndCondition : public SqlCondition
26//{
27//    SqlCondition mLeft;
28//    SqlCondition mRight;
29//
30//public:
31//    SqlAndCondition(const SqlCondition& left, const SqlCondition& right):
32//            mLeft(left), mRight(right) {}
33//
34//    QString toString() const;
35//};
36//
37//class SqlOrCondition : public SqlCondition
38//{
39//    SqlCondition mLeft;
40//    SqlCondition mRight;
41//
42//public:
43//    SqlOrCondition(const SqlCondition& left, const SqlCondition& right):
44//            mLeft(left), mRight(right) {}
45//
46//    QString toString() const;
47//};
48//
49//class SqlNotCondition : public SqlCondition
50//{
51//    SqlCondition mCond;
52//public:
53//    SqlNotCondition(const SqlCondition& cond): mCond(new SqlCondition(cond)) {}
54//
55//    QString toString() const;
56//};
57//
58//class SqlColumn
59//{
60//public:
61//    SqlColumn(const QLatin1String& column) : mColumn(column) {}
62//
63//    SqlCondition const operator==(const QVariant& value) { return SqlCondition(mColumn, SqlCondition::eq, value); }
64//    SqlCondition const operator!=(const QVariant& value) { return SqlCondition(mColumn, SqlCondition::ne, value); }
65//    SqlCondition const operator>=(const QVariant& value) { return SqlCondition(mColumn, SqlCondition::ge, value); }
66//    SqlCondition const operator> (const QVariant& value) { return SqlCondition(mColumn, SqlCondition::gt, value); }
67//    SqlCondition const operator<=(const QVariant& value) { return SqlCondition(mColumn, SqlCondition::le, value); }
68//    SqlCondition const operator< (const QVariant& value) { return SqlCondition(mColumn, SqlCondition::lt, value); }
69//private:
70//    QLatin1String mColumn;
71//};
72
73
74#endif // SQLCONDITION_H
Note: See TracBrowser for help on using the repository browser.