Herunterladen als
root/src/tableschema.h @ 1e213c09
4d58ef6a | Christian Ehringfeld | #ifndef TABLESCHEMA_H
|
|
#define TABLESCHEMA_H
|
|||
426974c6 | Christian Ehringfeld | #include <QString>
|
|
#include <QList>
|
|||
14f9beed | Christian Ehringfeld | #include <QStringList>
|
|
426974c6 | Christian Ehringfeld | #include <QHash>
|
|
14f9beed | Christian Ehringfeld | #include <QSharedPointer>
|
|
#include <QSqlField>
|
|||
#include <QSqlRelation>
|
|||
4d58ef6a | Christian Ehringfeld | namespace CuteEntityManager {
|
|
class TableSchema {
|
|||
426974c6 | Christian Ehringfeld | public:
|
|
4d58ef6a | Christian Ehringfeld | TableSchema();
|
|
~TableSchema();
|
|||
14f9beed | Christian Ehringfeld | virtual QSharedPointer<QSqlField> const getColumn(QString name) const;
|
|
virtual const QStringList getColumnNames();
|
|||
2c152ba3 | Christian Ehringfeld | ||
426974c6 | Christian Ehringfeld | QString getSchemaName() const;
|
|
void setSchemaName(const QString &value);
|
|||
QString getName() const;
|
|||
void setName(const QString &value);
|
|||
QString getFullName() const;
|
|||
void setFullName(const QString &value);
|
|||
14f9beed | Christian Ehringfeld | QStringList getPrimaryKeys() const;
|
|
void setPrimaryKeys(const QStringList &value);
|
|||
426974c6 | Christian Ehringfeld | ||
QString getSequenceName() const;
|
|||
void setSequenceName(const QString &value);
|
|||
14f9beed | Christian Ehringfeld | QHash<QString, QSharedPointer<QSqlField> > getColumns() const;
|
|
void setColumns(const QHash<QString, QSharedPointer<QSqlField> > &value);
|
|||
426974c6 | Christian Ehringfeld | ||
14f9beed | Christian Ehringfeld | QHash<QString, QSharedPointer<QSqlRelation> > getRelations() const;
|
|
void setRelations(const QHash<QString, QSharedPointer<QSqlRelation> > &value);
|
|||
426974c6 | Christian Ehringfeld | ||
14f9beed | Christian Ehringfeld | private:
|
|
426974c6 | Christian Ehringfeld | QString schemaName;
|
|
QString name;
|
|||
QString fullName;
|
|||
14f9beed | Christian Ehringfeld | QStringList primaryKeys;
|
|
426974c6 | Christian Ehringfeld | QString sequenceName;
|
|
14f9beed | Christian Ehringfeld | QHash<QString, QSharedPointer<QSqlRelation>> relations;
|
|
QHash<QString, QSharedPointer<QSqlField>> columns;
|
|||
4d58ef6a | Christian Ehringfeld | };
|
|
}
|
|||
#endif // TABLESCHEMA_H
|