kexi
KexiDB::QueryAsterisk Class Reference
#include <queryschema.h>
Inheritance diagram for KexiDB::QueryAsterisk:

Detailed Description
This class encapsulates information about single asterisk in query definition. There are two types of query asterisks:1. "Single-table" asterisk, that references all fields of given table used in the query. Example SQL statement:
SELECT staff.*, cars.model from staff, cars WHERE staff.car = cars.number;
2. "All-tables" asterisk, that references all fields of all tables used in the query. Example SQL statement:
SELECT * from staff, cars WHERE staff.car = cars.number;
There can be many asterisks of 1st type defined for given single query. There can be one asterisk of 2nd type defined for given single query.
Definition at line 536 of file queryschema.h.
Public Member Functions | |
QueryAsterisk (QuerySchema *query, TableSchema *table=0) | |
virtual | ~QueryAsterisk () |
QuerySchema * | query () const |
virtual TableSchema * | table () const |
virtual void | setTable (TableSchema *table) |
bool | isSingleTableAsterisk () const |
bool | isAllTableAsterisk () const |
virtual QString | debugString () |
Protected Attributes | |
TableSchema * | m_table |
Friends | |
class | QuerySchema |
Constructor & Destructor Documentation
QueryAsterisk::QueryAsterisk | ( | QuerySchema * | query, | |
TableSchema * | table = 0 | |||
) |
Constructs query asterisk definition object. Pass table schema to table if this asterisk should be of type "single-table", otherwise (if you want to define "all-tables" type asterisk), omit this parameter.
QueryAsterisk objects are owned by QuerySchema object (not by TableSchema object like for ordinary Field objects) for that the QueryAsterisk object was added (using QuerySchema::addField()).
Definition at line 1181 of file queryschema.cpp.
Member Function Documentation
QString QueryAsterisk::debugString | ( | ) | [virtual] |
- Returns:
- String for debugging purposes.
Reimplemented from KexiDB::Field.
Definition at line 1200 of file queryschema.cpp.
bool KexiDB::QueryAsterisk::isAllTableAsterisk | ( | ) | const [inline] |
This is convenience method that returns true if the asterisk has "single-tables" type (2nd type).
Definition at line 570 of file queryschema.h.
bool KexiDB::QueryAsterisk::isSingleTableAsterisk | ( | ) | const [inline] |
This is convenience method that returns true if the asterisk has "all-tables" type (2nd type).
Definition at line 566 of file queryschema.h.
QuerySchema* KexiDB::QueryAsterisk::query | ( | ) | const [inline] |
- Returns:
- Query object for that this asterisk object is defined
Reimplemented from KexiDB::Field.
Definition at line 553 of file queryschema.h.
void QueryAsterisk::setTable | ( | TableSchema * | table | ) | [virtual] |
Sets table schema for this asterisk. table may be NULL - then the asterisk becames "all-tables" type asterisk.
Reimplemented from KexiDB::Field.
Definition at line 1194 of file queryschema.cpp.
virtual TableSchema* KexiDB::QueryAsterisk::table | ( | ) | const [inline, virtual] |
- Returns:
- Table schema for this asterisk if it has "single-table" type (1st type) or NULL if it has "all-tables" type (2nd type) defined.
Reimplemented from KexiDB::Field.
Definition at line 558 of file queryschema.h.
Member Data Documentation
TableSchema* KexiDB::QueryAsterisk::m_table [protected] |
Table schema for this asterisk
Definition at line 577 of file queryschema.h.
The documentation for this class was generated from the following files: