KDbQueryParameterExpression

Search for usage in LXR

KDbQueryParameterExpression Class Reference

#include <KDbExpression.h>

Inheritance diagram for KDbQueryParameterExpression:

Public Member Functions

 KDbQueryParameterExpression ()
 
 KDbQueryParameterExpression (const KDbQueryParameterExpression &expr)
 
 KDbQueryParameterExpression (const QString &message)
 
void setType (KDbField::Type type)
 
- Public Member Functions inherited from KDbConstExpression
 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

 KDbQueryParameterExpression (const ExplicitlySharedExpressionDataPointer &ptr)
 
 KDbQueryParameterExpression (KDbExpressionData *data)
 
- Protected Member Functions inherited from KDbConstExpression
 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 KDbQueryParameterExpression class represents query parameter expression.

Query parameter is used to getting user input of constant values. It contains a message that is displayed to the user.

Definition at line 419 of file KDbExpression.h.

Constructor & Destructor Documentation

◆ KDbQueryParameterExpression() [1/5]

KDbQueryParameterExpression::KDbQueryParameterExpression ( )

Constructs a null query parameter expression.

See also
KDbExpression::isNull()

Definition at line 101 of file KDbQueryParameterExpression.cpp.

◆ KDbQueryParameterExpression() [2/5]

KDbQueryParameterExpression::KDbQueryParameterExpression ( const QString & message)
explicit

Constructs query parameter expression with message message.

Definition at line 107 of file KDbQueryParameterExpression.cpp.

◆ KDbQueryParameterExpression() [3/5]

KDbQueryParameterExpression::KDbQueryParameterExpression ( const KDbQueryParameterExpression & expr)

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

Definition at line 113 of file KDbQueryParameterExpression.cpp.

◆ ~KDbQueryParameterExpression()

KDbQueryParameterExpression::~KDbQueryParameterExpression ( )
override

Definition at line 129 of file KDbQueryParameterExpression.cpp.

◆ KDbQueryParameterExpression() [4/5]

KDbQueryParameterExpression::KDbQueryParameterExpression ( KDbExpressionData * data)
explicitprotected

Definition at line 118 of file KDbQueryParameterExpression.cpp.

◆ KDbQueryParameterExpression() [5/5]

KDbQueryParameterExpression::KDbQueryParameterExpression ( const ExplicitlySharedExpressionDataPointer & ptr)
explicitprotected

Definition at line 124 of file KDbQueryParameterExpression.cpp.

Member Function Documentation

◆ setType()

void KDbQueryParameterExpression::setType ( KDbField::Type type)

Sets expected type of the parameter. The default is String. This method is called from parent's expression validate(). This depends on the type of the related expression. For instance: query "SELECT * FROM cars WHERE name=[enter name]", "[enter name]" has parameter of the same type as "name" field. "=" binary expression's validate() will be called for the left side of the expression and then the right side will have type set to String.

Definition at line 133 of file KDbQueryParameterExpression.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 Sat Dec 21 2024 17:00:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.