Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

KDB::Query Class Reference

representation of a stored query. More...

#include <query.h>

Inheritance diagram for KDB::Query:

KDB::DataObject KDB::Object KDB::KShared KDB::QObject List of all members.

Public Methods

 ~Query ()
void addField (const QString &table, const QString &name)
 append a new field to the output list of the query it works only in design mode.

void addTable (const QString &name)
 add a table to the existing output list of tables.

void addCondition (const QString &condition)
 add a condition (where clause, but without 'where') to the query.

QString SQL ()
 return the SQL code associated to the query. More...

RecordsetPtr openRecordset ()
 creates a recordset based on this query.

bool isDesign ()
 returns true if the query is in design mode.


Protected Methods

 Query ( Connector * conn, const char * name, QObject *parent = 0, const QString &sql = QString::null )
virtual void buildSQL ()
 this function will create the SQL string to pass to the DBMS engine. More...


Friends

class  Database

Detailed Description

representation of a stored query.

Through this object we access the fields and parameters of the query, if any.

WARNING: this is unfinished: will gain query type (select, insert, update, delete) and parameter parsing and a lot of other stuff !!!

Author(s):
Alessandro Praduroux <pradu@thekompany.com> , Michael Koch <m_kock@bigfoot.de>
Version:
kdbcore 0.0.2


Constructor & Destructor Documentation

~Query ( )
 

Query ( Connector * conn,
const char * name,
QObject * parent = 0,
const QString & sql = QString::null ) [protected]
 


Member Function Documentation

QString SQL ( )
 

return the SQL code associated to the query.

if the query is in design mode, it will build with the actual tables, fields and conditions

void addCondition ( const QString & condition )
 

add a condition (where clause, but without 'where') to the query.

void addField ( const QString & table,
const QString & name )
 

append a new field to the output list of the query it works only in design mode.

void addTable ( const QString & name )
 

add a table to the existing output list of tables.

void buildSQL ( ) [protected, virtual]
 

this function will create the SQL string to pass to the DBMS engine.

It can be overridden by special types of queries ?? dunno if it will help

bool isDesign ( )
 

returns true if the query is in design mode.

RecordsetPtr openRecordset ( )
 

creates a recordset based on this query.


Friends And Related Function Documentation

class Database [friend]
 


The documentation for this class was generated from the following file:
Generated at Fri Sep 29 16:32:22 2000 for KDB by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000