#include <utils.h>
Public Member Functions | |
| TableOrQuerySchema (Connection *conn, const TQCString &name) | |
| TableOrQuerySchema (Connection *conn, const TQCString &name, bool table) | |
| TableOrQuerySchema (FieldList &tableOrQuery) | |
| TableOrQuerySchema (Connection *conn, int id) | |
| TableOrQuerySchema (TableSchema *table) | |
| TableOrQuerySchema (QuerySchema *query) | |
| QuerySchema * | query () const |
| TableSchema * | table () const |
| TQCString | name () const |
| TQString | captionOrName () const |
| uint | fieldCount () const |
| const QueryColumnInfo::Vector | columns (bool unique=false) |
| Field * | field (const TQString &name) |
| QueryColumnInfo * | columnInfo (const TQString &name) |
| Connection * | connection () const |
| TQString | debugString () |
| void | debug () |
Protected Attributes | |
| TQCString | m_name |
| TableSchema * | m_table |
| QuerySchema * | m_query |
Detailed Description
Variant class providing a pointer to table or query.
Definition at line 150 of file kexidb/utils.h.
Constructor & Destructor Documentation
◆ TableOrQuerySchema() [1/6]
| TableOrQuerySchema::TableOrQuerySchema | ( | Connection * | conn, |
| const TQCString & | 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() [2/6]
| TableOrQuerySchema::TableOrQuerySchema | ( | Connection * | conn, |
| const TQCString & | 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() [3/6]
| 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() [4/6]
| 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() [5/6]
| 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() [6/6]
| 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
◆ captionOrName()
| TQString TableOrQuerySchema::captionOrName | ( | ) | const |
- Returns
- caption (if present) or name of the table/query
Definition at line 278 of file kexidb/utils.cpp.
◆ columnInfo()
| QueryColumnInfo * TableOrQuerySchema::columnInfo | ( | const TQString & | name | ) |
Like Field* field(const TQString& name); but returns all information associated with field/column name.
Definition at line 296 of file kexidb/utils.cpp.
◆ columns()
| const QueryColumnInfo::Vector TableOrQuerySchema::columns | ( | bool | unique = false | ) |
- Returns
- all columns for the table or the query
Definition at line 257 of file kexidb/utils.cpp.
◆ connection()
| 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.
◆ debug()
| void TableOrQuerySchema::debug | ( | ) |
Shows debug information about table or query.
Definition at line 316 of file kexidb/utils.cpp.
◆ debugString()
| TQString TableOrQuerySchema::debugString | ( | ) |
- Returns
- String for debugging purposes.
Definition at line 307 of file kexidb/utils.cpp.
◆ field()
| Field * TableOrQuerySchema::field | ( | const TQString & | 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.
◆ fieldCount()
| uint TableOrQuerySchema::fieldCount | ( | ) | const |
- Returns
- number of fields
Definition at line 248 of file kexidb/utils.cpp.
◆ name()
| TQCString TableOrQuerySchema::name | ( | ) | const |
- Returns
- name of a query or table
Definition at line 269 of file kexidb/utils.cpp.
◆ query()
|
inline |
- Returns
- a pointer to the query if it's provided
Definition at line 187 of file kexidb/utils.h.
◆ table()
|
inline |
- Returns
- a pointer to the table if it's provided
Definition at line 190 of file kexidb/utils.h.
Member Data Documentation
◆ m_name
|
protected |
the name is kept here because m_table and m_table can be 0
Definition at line 222 of file kexidb/utils.h.
◆ m_query
|
protected |
Definition at line 225 of file kexidb/utils.h.
◆ m_table
|
protected |
and we still want name() and acptionOrName() work.
Definition at line 224 of file kexidb/utils.h.
The documentation for this class was generated from the following files:
