Akonadi::Server::Query::Condition

Akonadi::Server::Query::Condition Class Reference

#include <query.h>

Public Types

typedef QVector< ConditionList
 

Public Member Functions

 Condition (LogicOperator op=And)
 
void addColumnCondition (const QString &column, CompareOperator op, const QString &column2)
 
void addCondition (const Condition &condition)
 
void addValueCondition (const QString &column, CompareOperator op, const QVariant &value)
 
bool isEmpty () const
 
void setSubQueryMode (LogicOperator op)
 
Condition::List subConditions () const
 

Detailed Description

Represents a WHERE condition tree.

Definition at line 64 of file query.h.

Member Typedef Documentation

A list of conditions.

Definition at line 69 of file query.h.

Constructor & Destructor Documentation

Query::Condition::Condition ( LogicOperator  op = And)
explicit

Create an empty condition.

Parameters
ophow to combine sub queries.

Definition at line 33 of file query.cpp.

Member Function Documentation

void Condition::addColumnCondition ( const QString column,
CompareOperator  op,
const QString column2 
)

Add a WHERE condition which compares a column with another column.

Parameters
columnThe column that should be compared.
opThe operator used for comparison.
column2The column column is compared to.

Definition at line 22 of file query.cpp.

void Query::Condition::addCondition ( const Condition condition)

Add a WHERE condition.

Use this method to build hierarchical conditions.

Definition at line 54 of file query.cpp.

void Condition::addValueCondition ( const QString column,
CompareOperator  op,
const QVariant value 
)

Add a WHERE condition which compares a column with a given value.

Parameters
columnThe column that should be compared.
opThe operator used for comparison
valueThe value column is compared to.

Definition at line 12 of file query.cpp.

bool Query::Condition::isEmpty ( ) const

Returns if there are sub conditions.

Definition at line 39 of file query.cpp.

void Query::Condition::setSubQueryMode ( LogicOperator  op)

Set how sub-conditions should be combined, default is And.

Definition at line 49 of file query.cpp.

Condition::List Query::Condition::subConditions ( ) const

Returns the list of sub-conditions.

Definition at line 44 of file query.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 2 2020 23:15:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.