KDbConstExpression

Search for usage in LXR

#include <KDbExpression.h>

Inheritance diagram for KDbConstExpression:

Public Member Functions

 KDbConstExpression ()
 
 KDbConstExpression (const KDbConstExpression &expr)
 
 KDbConstExpression (KDbToken token, const QVariant &value)
 
void setValue (const QVariant &value)
 
QVariant value () const
 
- Public Member Functions inherited from KDbExpression
 KDbExpression ()
 
KDbExpression clone () const
 
QDebug debug (QDebug dbg, KDb::ExpressionCallStack *callStack) const
 
KDb::ExpressionClass expressionClass () const
 
void getQueryParameters (QList< KDbQuerySchemaParameter > *params)
 
bool isBinary () const
 
bool isConst () const
 
bool isDateTimeType () const
 
bool isFPNumericType () const
 
bool isFunction () const
 
bool isIntegerType () const
 
bool isNArg () const
 
bool isNull () const
 
bool isNumericType () const
 
bool isQueryParameter () const
 
bool isTextType () const
 
bool isUnary () const
 
bool isValid () const
 
bool isVariable () const
 
bool operator!= (const KDbExpression &e) const
 
bool operator== (const KDbExpression &e) const
 
KDbExpression parent () const
 
void setExpressionClass (KDb::ExpressionClass aClass)
 
void setToken (KDbToken token)
 
KDbBinaryExpression toBinary () const
 
KDbConstExpression toConst () const
 
KDbFunctionExpression toFunction () const
 
KDbToken token () const
 
KDbNArgExpression toNArg () const
 
KDbQueryParameterExpression toQueryParameter () const
 
KDbEscapedString toString (const KDbDriver *driver, KDbQuerySchemaParameterValueListIterator *params=nullptr, KDb::ExpressionCallStack *callStack=nullptr) const
 
KDbUnaryExpression toUnary () const
 
KDbVariableExpression toVariable () const
 
KDbField::Type type () const
 
bool validate (KDbParseInfo *parseInfo)
 

Protected Member Functions

 KDbConstExpression (const ExplicitlySharedExpressionDataPointer &ptr)
 
 KDbConstExpression (KDbExpressionData *data)
 
 KDbConstExpression (KDbExpressionData *data, KDb::ExpressionClass aClass, KDbToken token)
 
- Protected Member Functions inherited from KDbExpression
 KDbExpression (const ExplicitlySharedExpressionDataPointer &ptr)
 
 KDbExpression (KDbExpressionData *data)
 
 KDbExpression (KDbExpressionData *data, KDb::ExpressionClass aClass, KDbToken token)
 
void appendChild (const ExplicitlySharedExpressionDataPointer &child)
 
void appendChild (const KDbExpression &child)
 
bool checkBeforeInsert (const ExplicitlySharedExpressionDataPointer &child)
 
QList< ExplicitlySharedExpressionDataPointerchildren () const
 
int indexOfChild (const KDbExpression &child, int from=0) const
 
void insertChild (int i, const KDbExpression &child)
 
void insertEmptyChild (int i)
 
int lastIndexOfChild (const KDbExpression &child, int from=-1) const
 
void prependChild (const KDbExpression &child)
 
bool removeChild (const KDbExpression &child)
 
void removeChild (int i)
 
void setLeftOrRight (const KDbExpression &right, int index)
 
KDbExpression takeChild (int i)
 

Additional Inherited Members

- Static Public Member Functions inherited from KDbExpression
static KDb::ExpressionClass classForToken (KDbToken token)
 
- Protected Attributes inherited from KDbExpression
ExplicitlySharedExpressionDataPointer d
 

Detailed Description

The KDbConstExpression class represents const expression.

Types are string, integer, float constants. Also includes NULL value. Token can be: IDENTIFIER, SQL_NULL, SQL_TRUE, SQL_FALSE, CHARACTER_STRING_LITERAL, INTEGER_CONST, REAL_CONST, DATE_CONST, DATETIME_CONST, TIME_CONST.

Note
For REAL_CONST accepted values can be of type qreal, double and QPoint. In the case of QPoint, integer value (with a sign) is stored in QPoint::x and the fraction part (that should be always positive) is stored in QPoint::y. This gives 31 bits for the integer part (10 decimal digits) and 31 bits for the part (10 decimal digits).

Definition at line 386 of file KDbExpression.h.

Constructor & Destructor Documentation

◆ KDbConstExpression() [1/6]

KDbConstExpression::KDbConstExpression ( )

Constructs a null const expression.

See also
KDbExpression::isNull()

Definition at line 166 of file KDbConstExpression.cpp.

◆ KDbConstExpression() [2/6]

KDbConstExpression::KDbConstExpression ( KDbToken token,
const QVariant & value )

Constructs const expression token token and value value.

Definition at line 172 of file KDbConstExpression.cpp.

◆ KDbConstExpression() [3/6]

KDbConstExpression::KDbConstExpression ( const KDbConstExpression & expr)

Constructs a copy of other const expression expr. Resulting object is not a deep copy but rather a reference to the object expr.

Definition at line 193 of file KDbConstExpression.cpp.

◆ ~KDbConstExpression()

KDbConstExpression::~KDbConstExpression ( )
override

Definition at line 198 of file KDbConstExpression.cpp.

◆ KDbConstExpression() [4/6]

KDbConstExpression::KDbConstExpression ( KDbExpressionData * data,
KDb::ExpressionClass aClass,
KDbToken token )
protected

Internal, used by KDbQueryParameterExpression(const QString& message).

Definition at line 177 of file KDbConstExpression.cpp.

◆ KDbConstExpression() [5/6]

KDbConstExpression::KDbConstExpression ( KDbExpressionData * data)
explicitprotected

Definition at line 183 of file KDbConstExpression.cpp.

◆ KDbConstExpression() [6/6]

KDbConstExpression::KDbConstExpression ( const ExplicitlySharedExpressionDataPointer & ptr)
explicitprotected

Definition at line 188 of file KDbConstExpression.cpp.

Member Function Documentation

◆ setValue()

void KDbConstExpression::setValue ( const QVariant & value)

Definition at line 207 of file KDbConstExpression.cpp.

◆ value()

QVariant KDbConstExpression::value ( ) const

Definition at line 202 of file KDbConstExpression.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:12:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.