PACK WOC
$VERSION$
|
stores the internal representation of a database table and its abstraction class More...
#include <proctable.h>
Classes | |
struct | s_col |
holds data for a DB table column More... | |
Public Member Functions | |
WocTable () | |
initializes an invalid table More... | |
WocTable (const QDomElement &) | |
initializes a table from XML More... | |
bool | isValid () const |
returns whether this instance is valid, ie. More... | |
QString | name () const |
returns the table name More... | |
QString | baseClass () const |
returns the parent class of the table class - default: WobTable More... | |
bool | inBackup () const |
returns whether the table is marked for backup More... | |
QString | backupKey () const |
returns which column the table uses for backup grouping More... | |
int | backupGroupSize () const |
returns the default group size for backup or <=0 if default is to be used More... | |
bool | hasColumn (QString) const |
returns whether the table has a column with this name More... | |
QStringList | columns () const |
returns a list of all defined column names More... | |
QStringList | primaryColumns () const |
returns the list of all primary key columns More... | |
QString | columnType (QString) const |
returns the data type of the column More... | |
bool | columnIsNull (QString) const |
returns whether the column allows NULLs More... | |
bool | columnIsPrimary (QString) const |
returns whether the column is part of the primary key More... | |
bool | columnHasDefault (QString) const |
returns whether the column has a default More... | |
QString | columnDefault (QString) const |
returns the default value of the column (empty string if there is none) More... | |
bool | columnIsForeign (QString) const |
returns whether the column is a foreign key More... | |
QString | columnForeign (QString) const |
returns the foreign key reference of the column in the format table:column More... | |
bool | columnIsIndexed (QString) const |
returns whether the column has an index More... | |
bool | columnIsUnique (QString) const |
returns whether the column has a unique constraint More... | |
QList< WocEnum > | columnEnums (QString) const |
returns enum definitions of the column - each pair contains the symbolic name in first and the assigned integer value in second More... | |
QString | columnCall (QString col, QString lang) const |
returns the insert call of a column for a specific language; empty string if there is none More... | |
QList< WocEnum > | getEnums () const |
returns all enum definitions of the table; see also columnEnums More... | |
QStringList | foreigns () const |
returns a list of all foreign definitions - methods that return data from other tables More... | |
QString | foreignQuery (QString) const |
returns the definition of a specific foreign table query method More... | |
bool | haveForeign (QString) const |
returns whether a foreign table query method exists More... | |
QList< QMap< QString, QString > > | presets () const |
returns a list of all preset values (to be generated when the DB is created); each entry in the list is a dictionary with the column name as key and the intended preset value as value - each entry of the list is one DB row, each key-value-pair in the map is one preset value in that row More... | |
bool | isAuditable () const |
returns whether the table is auditable More... | |
WocTable | auditTable () const |
creates and returns the table instance that represents the audit table More... | |
QStringList | auditColumns () const |
returns the names of audit columns (except auditid) More... | |
QStringList | uniqueConstraints () const |
returns all complex Unique constraints (those not defined for a single column) More... | |
QStringList | docStrings () const |
returns table documentation More... | |
QString | columnDoc (QString c) const |
returns column documentation More... | |
QString | foreignDoc (QString c) const |
returns foreign getter documentation More... | |
Static Public Member Functions | |
static void | parseAuditStatic (const QDomElement &) |
parses the static part of auditing More... | |
Static Private Member Functions | |
static QPair< bool, s_col > | parseColumn (const QDomElement &, QString) |
Private Attributes | |
bool | m_valid |
bool | m_backup |
bool | m_audit |
QString | m_name |
QString | m_base |
QString | m_backupkey |
QList< s_col > | m_columns |
QList< s_col > | m_auditcolumns |
QList< QPair< QString, QString > > | m_foreign |
QList< QMap< QString, QString > > | m_presets |
int | m_backupsize =-1 |
QStringList | m_docstrings |
QStringList | m_uniquecols |
QMap< QString, QString > | m_fordocs |
Static Private Attributes | |
static QList< s_col > | m_staticauditcolumns |
stores the internal representation of a database table and its abstraction class
WocTable::WocTable | ( | ) |
initializes an invalid table
WocTable::WocTable | ( | const QDomElement & | tbl | ) |
initializes a table from XML
QStringList WocTable::auditColumns | ( | ) | const |
returns the names of audit columns (except auditid)
WocTable WocTable::auditTable | ( | ) | const |
creates and returns the table instance that represents the audit table
|
inline |
returns the default group size for backup or <=0 if default is to be used
|
inline |
returns which column the table uses for backup grouping
|
inline |
returns the parent class of the table class - default: WobTable
QString WocTable::columnCall | ( | QString | col, |
QString | lang | ||
) | const |
returns the insert call of a column for a specific language; empty string if there is none
QString WocTable::columnDefault | ( | QString | c | ) | const |
returns the default value of the column (empty string if there is none)
QString WocTable::columnDoc | ( | QString | c | ) | const |
returns column documentation
QList< WocEnum > WocTable::columnEnums | ( | QString | c | ) | const |
returns enum definitions of the column - each pair contains the symbolic name in first and the assigned integer value in second
QString WocTable::columnForeign | ( | QString | c | ) | const |
returns the foreign key reference of the column in the format table:column
bool WocTable::columnHasDefault | ( | QString | c | ) | const |
returns whether the column has a default
bool WocTable::columnIsForeign | ( | QString | c | ) | const |
returns whether the column is a foreign key
bool WocTable::columnIsIndexed | ( | QString | c | ) | const |
returns whether the column has an index
bool WocTable::columnIsNull | ( | QString | c | ) | const |
returns whether the column allows NULLs
bool WocTable::columnIsPrimary | ( | QString | c | ) | const |
returns whether the column is part of the primary key
bool WocTable::columnIsUnique | ( | QString | c | ) | const |
returns whether the column has a unique constraint
QStringList WocTable::columns | ( | ) | const |
returns a list of all defined column names
QString WocTable::columnType | ( | QString | c | ) | const |
returns the data type of the column
|
inline |
returns table documentation
|
inline |
returns foreign getter documentation
QString WocTable::foreignQuery | ( | QString | f | ) | const |
returns the definition of a specific foreign table query method
QStringList WocTable::foreigns | ( | ) | const |
returns a list of all foreign definitions - methods that return data from other tables
QList< WocEnum > WocTable::getEnums | ( | ) | const |
returns all enum definitions of the table; see also columnEnums
bool WocTable::hasColumn | ( | QString | c | ) | const |
returns whether the table has a column with this name
bool WocTable::haveForeign | ( | QString | f | ) | const |
returns whether a foreign table query method exists
|
inline |
returns whether the table is marked for backup
|
inline |
returns whether the table is auditable
|
inline |
returns whether this instance is valid, ie.
whether parsing was successful
|
inline |
returns the table name
|
static |
parses the static part of auditing
|
staticprivate |
|
inline |
returns a list of all preset values (to be generated when the DB is created); each entry in the list is a dictionary with the column name as key and the intended preset value as value - each entry of the list is one DB row, each key-value-pair in the map is one preset value in that row
QStringList WocTable::primaryColumns | ( | ) | const |
returns the list of all primary key columns
|
inline |
returns all complex Unique constraints (those not defined for a single column)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |