kexi
KexiDB::TableOrQuerySchema Class Reference
#include <utils.h>
Detailed Description
Variant class providing a pointer to table or query.
Definition at line 143 of file kexidb/utils.h.
Public Member Functions | |
TableOrQuerySchema (Connection *conn, const QCString &name) | |
TableOrQuerySchema (Connection *conn, const QCString &name, bool table) | |
TableOrQuerySchema (FieldList &tableOrQuery) | |
TableOrQuerySchema (Connection *conn, int id) | |
TableOrQuerySchema (TableSchema *table) | |
TableOrQuerySchema (QuerySchema *query) | |
QuerySchema * | query () const |
TableSchema * | table () const |
QCString | name () const |
QString | captionOrName () const |
uint | fieldCount () const |
const QueryColumnInfo::Vector | columns (bool unique=false) |
Field * | field (const QString &name) |
QueryColumnInfo * | columnInfo (const QString &name) |
Connection * | connection () const |
QString | debugString () |
void | debug () |
Protected Attributes | |
QCString | m_name |
TableSchema * | m_table |
QuerySchema * | m_query |
Constructor & Destructor Documentation
TableOrQuerySchema::TableOrQuerySchema | ( | Connection * | conn, | |
const QCString & | name | |||
) |
Creates a new TableOrQuerySchema variant object, retrieving table or query schema using conn connection and name. If both table and query exists for name, table has priority over query. You should check whether a query or table has been found by testing (query() || table()) expression.
Definition at line 191 of file kexidb/utils.cpp.
TableOrQuerySchema::TableOrQuerySchema | ( | Connection * | conn, | |
const QCString & | name, | |||
bool | table | |||
) |
Creates a new TableOrQuerySchema variant object, retrieving table or query schema using conn connection and name. If table is true, name is assumed to be a table name, otherwise name is assumed to be a query name. You should check whether a query or table has been found by testing (query() || table()) expression.
Definition at line 201 of file kexidb/utils.cpp.
TableOrQuerySchema::TableOrQuerySchema | ( | FieldList & | tableOrQuery | ) |
Creates a new TableOrQuerySchema variant object. tableOrQuery must be of class TableSchema or QuerySchema. You should check whether a query or table has been found by testing (query() || table()) expression.
Definition at line 214 of file kexidb/utils.cpp.
TableOrQuerySchema::TableOrQuerySchema | ( | Connection * | conn, | |
int | id | |||
) |
Creates a new TableOrQuerySchema variant object, retrieving table or query schema using conn connection and id. You should check whether a query or table has been found by testing (query() || table()) expression.
Definition at line 223 of file kexidb/utils.cpp.
TableOrQuerySchema::TableOrQuerySchema | ( | TableSchema * | table | ) |
Creates a new TableOrQuerySchema variant object, keeping a pointer so table object.
Definition at line 232 of file kexidb/utils.cpp.
TableOrQuerySchema::TableOrQuerySchema | ( | QuerySchema * | query | ) |
Creates a new TableOrQuerySchema variant object, keeping a pointer so query object.
Definition at line 240 of file kexidb/utils.cpp.
Member Function Documentation
QuerySchema* KexiDB::TableOrQuerySchema::query | ( | ) | const [inline] |
TableSchema* KexiDB::TableOrQuerySchema::table | ( | ) | const [inline] |
QCString TableOrQuerySchema::name | ( | ) | const |
QString TableOrQuerySchema::captionOrName | ( | ) | const |
- Returns:
- caption (if present) or name of the table/query
Definition at line 278 of file kexidb/utils.cpp.
uint TableOrQuerySchema::fieldCount | ( | ) | const |
const QueryColumnInfo::Vector TableOrQuerySchema::columns | ( | bool | unique = false |
) |
Field * TableOrQuerySchema::field | ( | const QString & | name | ) |
- Returns:
- a field of the table or the query schema for name name or 0 if there is no such field.
Definition at line 286 of file kexidb/utils.cpp.
QueryColumnInfo * TableOrQuerySchema::columnInfo | ( | const QString & | name | ) |
Like Field* field(const QString& name); but returns all information associated with field/column name.
Definition at line 296 of file kexidb/utils.cpp.
Connection * TableOrQuerySchema::connection | ( | ) | const |
- Returns:
- connection object, for table or query or 0 if there's no table or query defined.
Definition at line 324 of file kexidb/utils.cpp.
QString TableOrQuerySchema::debugString | ( | ) |
void TableOrQuerySchema::debug | ( | ) |
Shows debug information about table or query.
Definition at line 316 of file kexidb/utils.cpp.
Member Data Documentation
QCString KexiDB::TableOrQuerySchema::m_name [protected] |
the name is kept here because m_table and m_table can be 0 and we still want name() and acptionOrName() work.
Definition at line 215 of file kexidb/utils.h.
The documentation for this class was generated from the following files: