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

Detailed Description
KexiDB::QueryAsterisk 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 778 of file queryschema.h.
Public Member Functions | |
QueryAsterisk (QuerySchema *query, TableSchema *table=0) | |
QuerySchema * | query () const |
virtual TableSchema * | table () const |
virtual void | setTable (TableSchema *table) |
virtual bool | isQueryAsterisk () const |
bool | isSingleTableAsterisk () const |
bool | isAllTableAsterisk () const |
virtual QString | debugString () const |
Protected Member Functions | |
virtual Field * | copy () const |
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 1816 of file queryschema.cpp.
Member Function Documentation
QuerySchema* KexiDB::QueryAsterisk::query | ( | ) | const [inline] |
- Returns:
- Query object for that this asterisk object is defined
Reimplemented from KexiDB::Field.
Definition at line 795 of file queryschema.h.
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 800 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 1834 of file queryschema.cpp.
virtual bool KexiDB::QueryAsterisk::isQueryAsterisk | ( | ) | const [inline, virtual] |
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 811 of file queryschema.h.
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 815 of file queryschema.h.
QString QueryAsterisk::debugString | ( | ) | const [virtual] |
- Returns:
- String for debugging purposes.
Reimplemented from KexiDB::Field.
Definition at line 1840 of file queryschema.cpp.
Field * QueryAsterisk::copy | ( | ) | const [protected, virtual] |
- Returns:
- a deep copy of this object. Used in FieldList(const FieldList& fl).
Reimplemented from KexiDB::Field.
Definition at line 1829 of file queryschema.cpp.
Member Data Documentation
TableSchema* KexiDB::QueryAsterisk::m_table [protected] |
Table schema for this asterisk
Definition at line 825 of file queryschema.h.
The documentation for this class was generated from the following files: