QDjango
Main Page
Related Pages
Modules
Classes
Files
File List
All
Classes
Functions
Typedefs
Enumerations
Enumerator
Properties
Groups
Pages
src
db
QDjangoWhere.h
1
/*
2
* Copyright (C) 2010-2012 Jeremy Lainé
3
* Contact: http://code.google.com/p/qdjango/
4
*
5
* This file is part of the QDjango Library.
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
11
*
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
16
*/
17
18
#ifndef QDJANGO_WHERE_H
19
#define QDJANGO_WHERE_H
20
21
#include <QSharedDataPointer>
22
#include <QVariant>
23
24
#include "QDjango_p.h"
25
26
class
QDjangoMetaModel
;
27
class
QDjangoQuery;
28
class
QDjangoWherePrivate;
29
40
class
QDJANGO_EXPORT
QDjangoWhere
41
{
42
public
:
44
enum
Operation
45
{
47
None
,
49
Equals
,
51
NotEquals
,
53
GreaterThan
,
55
LessThan
,
57
GreaterOrEquals
,
59
LessOrEquals
,
61
StartsWith
,
63
EndsWith
,
65
Contains
,
67
IsIn
,
69
IsNull
70
};
71
72
QDjangoWhere
();
73
QDjangoWhere
(
const
QDjangoWhere
&other);
74
QDjangoWhere
(
const
QString &key,
QDjangoWhere::Operation
operation, QVariant value);
75
~
QDjangoWhere
();
76
77
QDjangoWhere
& operator=(
const
QDjangoWhere
&other);
78
QDjangoWhere
operator!()
const
;
79
QDjangoWhere
operator&&(
const
QDjangoWhere
&other)
const
;
80
QDjangoWhere
operator||(
const
QDjangoWhere
&other)
const
;
81
82
void
bindValues(QDjangoQuery &query)
const
;
83
bool
isAll()
const
;
84
bool
isNone()
const
;
85
QString sql(
const
QSqlDatabase &db)
const
;
86
87
private
:
88
QSharedDataPointer<QDjangoWherePrivate> d;
89
friend
class
QDjangoCompiler;
90
};
91
92
#endif
Generated on Thu Jun 27 2013 13:11:51 for QDjango by
1.8.4