Kexi API Documentation (2.0 alpha)

KexiDB::QueryParameterExpr Class Reference

#include <expression.h>

Inheritance diagram for KexiDB::QueryParameterExpr:

KexiDB::ConstExpr KexiDB::BaseExpr List of all members.

Detailed Description

Query parameter used to getting user input of constant values.

It contains a message that is displayed to the user.

Definition at line 197 of file expression.h.

Public Member Functions

 QueryParameterExpr (const QString &message)
virtual ~QueryParameterExpr ()
virtual Field::Type type ()
void setType (Field::Type type)
virtual QString debugString ()
virtual QString toString (QuerySchemaParameterValueListIterator *params=0)
virtual void getQueryParameters (QuerySchemaParameterList &params)
virtual bool validate (ParseInfo &parseInfo)

Protected Attributes

Field::Type m_type


Constructor & Destructor Documentation

QueryParameterExpr::QueryParameterExpr const QString message  ) 
 

Definition at line 523 of file expression.cpp.

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

QueryParameterExpr::~QueryParameterExpr  )  [virtual]
 

Definition at line 530 of file expression.cpp.


Member Function Documentation

QString QueryParameterExpr::debugString  )  [virtual]
 

Reimplemented from KexiDB::ConstExpr.

Definition at line 544 of file expression.cpp.

References KexiDB::Driver::defaultSQLTypeName(), type(), and KexiDB::ConstExpr::value.

void QueryParameterExpr::getQueryParameters QuerySchemaParameterList params  )  [virtual]
 

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

Reimplemented from KexiDB::ConstExpr.

Definition at line 555 of file expression.cpp.

References KexiDB::QuerySchemaParameter::message, type(), KexiDB::QuerySchemaParameter::type, and KexiDB::ConstExpr::value.

void QueryParameterExpr::setType Field::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 539 of file expression.cpp.

References m_type.

QString QueryParameterExpr::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).

Reimplemented from KexiDB::ConstExpr.

Definition at line 550 of file expression.cpp.

References type(), and KexiDB::ConstExpr::value.

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

Reimplemented from KexiDB::ConstExpr.

Definition at line 534 of file expression.cpp.

References m_type.

Referenced by debugString(), getQueryParameters(), toString(), and validate().

bool QueryParameterExpr::validate ParseInfo parseInfo  )  [virtual]
 

Reimplemented from KexiDB::ConstExpr.

Definition at line 563 of file expression.cpp.

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


Member Data Documentation

Field::Type KexiDB::QueryParameterExpr::m_type [protected]
 

Definition at line 217 of file expression.h.

Referenced by setType(), and type().


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