KDbVariableExpressionData
#include <KDbExpressionData.h>
Public Member Functions | |
KDbVariableExpressionData (const QString &aName) | |
KDbVariableExpressionData * | clone () override |
void | getQueryParameters (QList< KDbQuerySchemaParameter > *params) override |
Public Member Functions inherited from KDbExpressionData | |
template<typename T > | |
T * | convert () |
template<typename T > | |
const T * | convertConst () const |
QDebug | debug (QDebug dbg, KDb::ExpressionCallStack *callStack) const |
bool | isDateTimeType () const |
bool | isFPNumericType () const |
bool | isIntegerType () const |
bool | isNumericType () const |
bool | isTextType () const |
bool | isValid () const |
KDbEscapedString | toString (const KDbDriver *driver, KDbQuerySchemaParameterValueListIterator *params=nullptr, KDb::ExpressionCallStack *callStack=nullptr) const |
KDbField::Type | type () const |
KDbField::Type | type (KDb::ExpressionCallStack *callStack) const |
bool | validate (KDbParseInfo *parseInfo) |
bool | validate (KDbParseInfo *parseInfo, KDb::ExpressionCallStack *callStack) |
Public Member Functions inherited from QSharedData | |
QSharedData (const QSharedData &) | |
Public Attributes | |
KDbField * | field |
QString | name |
KDbTableSchema * | tableForQueryAsterisk |
int | tablePositionForField |
Public Attributes inherited from KDbExpressionData | |
QList< ExplicitlySharedExpressionDataPointer > | children |
KDb::ExpressionClass | expressionClass |
ExplicitlySharedExpressionDataPointer | parent |
KDbToken | token |
Protected Member Functions | |
void | debugInternal (QDebug dbg, KDb::ExpressionCallStack *callStack) const override |
KDbEscapedString | toStringInternal (const KDbDriver *driver, KDbQuerySchemaParameterValueListIterator *params, KDb::ExpressionCallStack *callStack) const override |
KDbField::Type | typeInternal (KDb::ExpressionCallStack *callStack) const override |
bool | validateInternal (KDbParseInfo *parseInfo, KDb::ExpressionCallStack *callStack) override |
Protected Member Functions inherited from KDbExpressionData | |
bool | addToCallStack (QDebug *dbg, KDb::ExpressionCallStack *callStack) const |
Detailed Description
Internal data class used to implement implicitly shared class KDbVariableExpression.
Provides thread-safe reference counting.
Definition at line 268 of file KDbExpressionData.h.
Constructor & Destructor Documentation
◆ KDbVariableExpressionData() [1/2]
KDbVariableExpressionData::KDbVariableExpressionData | ( | ) |
Definition at line 30 of file KDbVariableExpression.cpp.
◆ KDbVariableExpressionData() [2/2]
|
explicit |
Definition at line 39 of file KDbVariableExpression.cpp.
◆ ~KDbVariableExpressionData()
|
override |
Definition at line 49 of file KDbVariableExpression.cpp.
Member Function Documentation
◆ clone()
|
overridevirtual |
Reimplemented from KDbExpressionData.
Definition at line 54 of file KDbVariableExpression.cpp.
◆ debugInternal()
|
overrideprotectedvirtual |
Sends information about this expression to debug output dbg (internal).
Reimplemented from KDbExpressionData.
Definition at line 60 of file KDbVariableExpression.cpp.
◆ getQueryParameters()
|
overridevirtual |
Reimplemented from KDbExpressionData.
Definition at line 79 of file KDbVariableExpression.cpp.
◆ toStringInternal()
|
overrideprotectedvirtual |
Reimplemented from KDbExpressionData.
Definition at line 68 of file KDbVariableExpression.cpp.
◆ typeInternal()
|
overrideprotectedvirtual |
We're assuming it's called after VariableExpr::validate()
Reimplemented from KDbExpressionData.
Definition at line 85 of file KDbVariableExpression.cpp.
◆ validateInternal()
|
overrideprotectedvirtual |
Validation. Sets field, tablePositionForField and tableForQueryAsterisk members. See addColumn() in parse.y to see how it's used on column adding.
- Todo
- shall we also support db name?
Reimplemented from KDbExpressionData.
Definition at line 102 of file KDbVariableExpression.cpp.
Member Data Documentation
◆ field
KDbField* KDbVariableExpressionData::field |
0 by default. After successful validate() it will point to a field, if the variable is of a form "tablename.fieldname" or "fieldname", otherwise (eg. for asterisks) still 0. Only meaningful for column expressions within a query.
Definition at line 283 of file KDbExpressionData.h.
◆ name
QString KDbVariableExpressionData::name |
Verbatim name as returned by scanner.
Definition at line 277 of file KDbExpressionData.h.
◆ tableForQueryAsterisk
KDbTableSchema* KDbVariableExpressionData::tableForQueryAsterisk |
0 by default. After successful validate() it will point to a table that is referenced by asterisk, i.e. "*.tablename". This is set to nullptr
if this variable is not an asterisk of that form.
Definition at line 296 of file KDbExpressionData.h.
◆ tablePositionForField
int KDbVariableExpressionData::tablePositionForField |
-1 by default. After successful validate() it will contain a position of a table within query that needs to be bound to the field. This value can be either be -1 if no binding is needed. This value is used in the Parser to call KDbQuerySchema::addField(KDbField* field, int bindToTable); Only meaningful for column expressions within a query.
Definition at line 291 of file KDbExpressionData.h.
The documentation for this class was generated from the following files:
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.