Kexi API Documentation (2.0 alpha)

KexiDB::VariableExpr Class Reference

#include <expression.h>

Inheritance diagram for KexiDB::VariableExpr:

KexiDB::BaseExpr List of all members.

Detailed Description

Variables like fieldname or tablename.fieldname.

Definition at line 221 of file expression.h.

Public Member Functions

 VariableExpr (const QString &_name)
virtual ~VariableExpr ()
virtual Field::Type type ()
 We're assuming it's called after VariableExpr::validate().
virtual QString debugString ()
virtual QString toString (QuerySchemaParameterValueListIterator *params=0)
virtual void getQueryParameters (QuerySchemaParameterList &params)
virtual bool validate (ParseInfo &parseInfo)

Public Attributes

QString name
Fieldfield
int tablePositionForField
TableSchematableForQueryAsterisk


Constructor & Destructor Documentation

VariableExpr::VariableExpr const QString _name  ) 
 

Definition at line 570 of file expression.cpp.

References KexiDBExpr_Variable, and KexiDB::BaseExpr::m_cl.

VariableExpr::~VariableExpr  )  [virtual]
 

Definition at line 580 of file expression.cpp.


Member Function Documentation

QString VariableExpr::debugString  )  [virtual]
 

Reimplemented from KexiDB::BaseExpr.

Definition at line 584 of file expression.cpp.

References KexiDB::Driver::defaultSQLTypeName(), field, name, and type().

void VariableExpr::getQueryParameters QuerySchemaParameterList params  )  [virtual]
 

Collects query parameters (messages and types) reculsively and saves them to params. The leaf nodes are objects of QueryParameterExpr class.

Implements KexiDB::BaseExpr.

Definition at line 596 of file expression.cpp.

QString VariableExpr::toString QuerySchemaParameterValueListIterator params = 0  )  [virtual]
 

Returns:
string as a representation of this expression element by running recursive calls. param, if not 0, points to a list item containing value of a query parameter (used in QueryParameterExpr).

Implements KexiDB::BaseExpr.

Definition at line 590 of file expression.cpp.

References name.

Field::Type VariableExpr::type  )  [virtual]
 

We're assuming it's called after VariableExpr::validate().

Reimplemented from KexiDB::BaseExpr.

Definition at line 602 of file expression.cpp.

References field, KexiDB::Field::InvalidType, and KexiDB::Field::type().

Referenced by debugString().

bool VariableExpr::validate ParseInfo parseInfo  )  [virtual]
 

Validation. Sets field, tablePositionForField and tableForQueryAsterisk members. See addColumn() in parse.y to see how it's used on column adding.

Reimplemented from KexiDB::BaseExpr.

Definition at line 613 of file expression.cpp.

References KexiDB::FieldList::field(), field, foreach_list, IMPL_ERROR, KexiDBDbg, name, KexiDB::Field::table(), tableForQueryAsterisk, tablePositionForField, and KexiDB::BaseExpr::validate().


Member Data Documentation

Field* KexiDB::VariableExpr::field
 

Definition at line 243 of file expression.h.

Referenced by addColumn(), debugString(), type(), and validate().

QString KexiDB::VariableExpr::name
 

Verbatim name as returned by scanner.

Definition at line 237 of file expression.h.

Referenced by addColumn(), buildSelectQuery(), debugString(), KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(), toString(), and validate().

TableSchema* KexiDB::VariableExpr::tableForQueryAsterisk
 

NULL by default. After successful validate() it will point to a table that is referenced by asterisk, i.e. "*.tablename". This is set to NULL if this variable is not an asterisk of that form.

Definition at line 256 of file expression.h.

Referenced by addColumn(), and validate().

int KexiDB::VariableExpr::tablePositionForField
 

Definition at line 251 of file expression.h.

Referenced by addColumn(), and validate().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:44 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003