Revision 426974c6
Von Christian Ehringfeld vor fast 10 Jahren hinzugefügt
src/columnschema.h | ||
---|---|---|
|
||
namespace CuteEntityManager {
|
||
|
||
class ColumnSchema
|
||
{
|
||
public:
|
||
class ColumnSchema {
|
||
public:
|
||
ColumnSchema();
|
||
~ColumnSchema();
|
||
QString getName() const;
|
||
... | ... | |
QString getComment() const;
|
||
void setComment(const QString &value);
|
||
|
||
private:
|
||
private:
|
||
QString name;
|
||
bool allowNull;
|
||
QString dbType;
|
src/database.cpp | ||
---|---|---|
}
|
||
|
||
Database::Database(QString databaseType, QString connectionName, QString databasename) {
|
||
this->database = QSqlDatabase::addDatabase(databaseType,connectionName);
|
||
this->database = QSqlDatabase::addDatabase(databaseType, connectionName);
|
||
this->connectionName = connectionName;
|
||
this->database.setDatabaseName(databasename);
|
||
this->init();
|
||
}
|
||
|
||
Database::Database(QString databaseType, QString connectionName, QString hostname, QString databasename, QString username, QString password, qint64 port) {
|
||
this->database = QSqlDatabase::addDatabase(databaseType,connectionName);
|
||
Database::Database(QString databaseType, QString connectionName, QString hostname, QString databasename,
|
||
QString username, QString password, qint64 port) {
|
||
this->database = QSqlDatabase::addDatabase(databaseType, connectionName);
|
||
this->connectionName = connectionName;
|
||
this->database.setHostName(hostname);
|
||
this->database.setDatabaseName(databasename);
|
||
... | ... | |
}
|
||
|
||
void Database::getTableListFromDatabase() {
|
||
if(this->database.open()) {
|
||
if (this->database.open()) {
|
||
QString q = "";
|
||
if(this->databasetype == CuteEntityManager::SQLITE) {
|
||
if (this->databasetype == CuteEntityManager::SQLITE) {
|
||
q = this->sqliteTableList();
|
||
} else if(this->databasetype == CuteEntityManager::MYSQL){
|
||
} else if (this->databasetype == CuteEntityManager::MYSQL) {
|
||
q = this->mysqlTableList();
|
||
} else if(this->databasetype == CuteEntityManager::PGSQL) {
|
||
} else if (this->databasetype == CuteEntityManager::PGSQL) {
|
||
q = this->pgsqlSeqTable();
|
||
}
|
||
QSqlQuery query = QSqlQuery(this->database);
|
||
... | ... | |
}
|
||
|
||
void Database::setTableList(QSqlQuery &q) {
|
||
while(q.next()) {
|
||
while (q.next()) {
|
||
this->tableList->append(q.value(0).toString());
|
||
}
|
||
}
|
||
... | ... | |
//}
|
||
|
||
Database::~Database() {
|
||
if(this->database.isOpen()) {
|
||
if (this->database.isOpen()) {
|
||
this->database.close();
|
||
}
|
||
QSqlDatabase::removeDatabase(this->connectionName);
|
||
... | ... | |
|
||
QChar Database::escapeChar() {
|
||
QChar c = QChar();
|
||
if(this->databasetype == CuteEntityManager::SQLITE) {
|
||
if (this->databasetype == CuteEntityManager::SQLITE) {
|
||
c = '\'';
|
||
} else if(this->databasetype == CuteEntityManager::MYSQL) {
|
||
} else if (this->databasetype == CuteEntityManager::MYSQL) {
|
||
c = '`';
|
||
}
|
||
return c;
|
||
... | ... | |
|
||
bool Database::transaction(const QString &query) {
|
||
bool rc = false;
|
||
if(supportTransactions) {
|
||
if (supportTransactions) {
|
||
this->database.transaction();
|
||
QSqlQuery sqlquery = QSqlQuery(this->database);
|
||
sqlquery.exec(query);
|
||
if(!this->database.commit()) {
|
||
if (!this->database.commit()) {
|
||
this->database.rollback();
|
||
}
|
||
} else {
|
||
... | ... | |
|
||
bool Database::transaction(const QStringList &queries) {
|
||
bool ok = false;
|
||
if(this->supportTransactions) {
|
||
if (this->supportTransactions) {
|
||
this->database.transaction();
|
||
QSqlQuery sqlquery = QSqlQuery(this->database);
|
||
for (int var = 0; var < queries.size(); ++var) {
|
||
sqlquery.exec(queries.at(var));
|
||
}
|
||
if(!this->database.commit()) {
|
||
if (!this->database.commit()) {
|
||
this->database.rollback();
|
||
} else {
|
||
ok = true;
|
||
... | ... | |
bool Database::transaction(QSqlQuery &query) {
|
||
this->database.transaction();
|
||
query.exec();
|
||
if(!this->database.commit()) {
|
||
if (!this->database.commit()) {
|
||
this->database.rollback();
|
||
return false;
|
||
}
|
||
... | ... | |
q = queries.at(var);
|
||
q.exec();
|
||
}
|
||
if(!this->database.commit()) {
|
||
if (!this->database.commit()) {
|
||
this->database.rollback();
|
||
return false;
|
||
}
|
||
... | ... | |
this->database.transaction();
|
||
QSqlQuery q = QSqlQuery(this->database);
|
||
q.exec(query);
|
||
if(!this->database.commit()) {
|
||
if (!this->database.commit()) {
|
||
this->database.rollback();
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
bool Database::exec(QStringList queries){
|
||
bool Database::exec(QStringList queries) {
|
||
QSqlQuery q = QSqlQuery(this->database);
|
||
bool ok = true;
|
||
for (int var = 0; var < queries.size() && ok; ++var) {
|
||
ok = q.exec(queries.at(var));
|
||
if(!ok) {
|
||
if (!ok) {
|
||
break;
|
||
}
|
||
}
|
||
... | ... | |
for (int var = 0; var < queries.size() && ok; ++var) {
|
||
q = queries.at(var);
|
||
ok = q.exec();
|
||
if(!ok) {
|
||
if (!ok) {
|
||
break;
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
|
||
void Database::createSequenceTable() {
|
||
if(this->database.open() && this->getLastId() == -1) {
|
||
if (this->database.open() && this->getLastId() == -1) {
|
||
QString query = "";
|
||
QStringList l = QStringList();
|
||
if(this->databasetype == CuteEntityManager::MYSQL) {
|
||
if (this->databasetype == CuteEntityManager::MYSQL) {
|
||
query = this->mysqlSeqTable();
|
||
} else if(this->databasetype == CuteEntityManager::SQLITE) {
|
||
} else if (this->databasetype == CuteEntityManager::SQLITE) {
|
||
query = this->sqliteSeqTable();
|
||
} else if(this->databasetype == CuteEntityManager::PGSQL) {
|
||
} else if (this->databasetype == CuteEntityManager::PGSQL) {
|
||
query = this->pgsqlSeqTable();
|
||
}
|
||
l.append(query);
|
||
l.append(this->querySequenceCounter());
|
||
if(this->transaction(l)) {
|
||
if (this->transaction(l)) {
|
||
this->setSeqTable(true);
|
||
} else {
|
||
this->setSeqTable(false);
|
||
... | ... | |
|
||
bool Database::updateSequenceCounter(QSqlQuery &q) {
|
||
QList<QSqlQuery> l = QList<QSqlQuery>();
|
||
l.append(QSqlQuery("UPDATE sequence SET SEQ_COUNT=(SEQ_COUNT+1);",this->database));
|
||
l.append(QSqlQuery("UPDATE sequence SET SEQ_COUNT=(SEQ_COUNT+1);", this->database));
|
||
l.append(q);
|
||
return this->transaction(l);
|
||
}
|
||
... | ... | |
qint64 Database::getLastId() {
|
||
qint64 id = -1;
|
||
QSqlQuery q = this->select("SELECT SEQ_COUNT FROM sequence WHERE SEQ_NAME=\'id_count\';");
|
||
if(q.next()) {
|
||
if (q.next()) {
|
||
id = q.value(0).toInt();
|
||
}
|
||
return id;
|
src/database.h | ||
---|---|---|
#include "enums/databasetype.h"
|
||
namespace CuteEntityManager {
|
||
|
||
class Database
|
||
{
|
||
private:
|
||
class Database {
|
||
private:
|
||
QSqlDatabase database;
|
||
QString connectionName;
|
||
bool seqTable;
|
||
... | ... | |
QString querySequenceCounter();
|
||
QStringList *tableList;
|
||
|
||
protected:
|
||
protected:
|
||
inline QString pgsqlSeqTable();
|
||
inline QString mysqlSeqTable();
|
||
inline QString sqliteSeqTable();
|
||
... | ... | |
inline QString mysqlTableList();
|
||
inline QString pgsqlTableList();
|
||
|
||
public:
|
||
public:
|
||
Database(QSqlDatabase database);
|
||
~Database();
|
||
Database(QString databaseType, QString databasename);
|
||
Database(QString databaseType, QString connectionName, QString databasename);
|
||
Database(QString databaseType, QString connectionName= "", QString hostname="",QString databasename = "" , QString username ="", QString password="", qint64 port=0);
|
||
Database(QString databaseType, QString connectionName = "", QString hostname = "", QString databasename = "" ,
|
||
QString username = "", QString password = "", qint64 port = 0);
|
||
QSqlDatabase getDatabase();
|
||
QString getConnectionName();
|
||
QSqlQuery getQuery();
|
src/entity.cpp | ||
---|---|---|
|
||
namespace CuteEntityManager {
|
||
|
||
Entity::Entity() : QObject(){
|
||
Entity::Entity() : QObject() {
|
||
this->id = -1;
|
||
}
|
||
|
src/entity.h | ||
---|---|---|
|
||
class Entity : public QObject {
|
||
Q_OBJECT
|
||
public:
|
||
public:
|
||
virtual qint64 getId();
|
||
virtual void setId(qint64 id);
|
||
virtual ~Entity();
|
||
virtual QString getTablename() = 0;
|
||
// virtual QMap<QString, QString> getManyToManyRelations() = 0; //Key = Table, Value = joined Table Column
|
||
protected:
|
||
protected:
|
||
Entity();
|
||
qint64 id;
|
||
};
|
src/entitymanager.cpp | ||
---|---|---|
this->db = new Database(database);
|
||
}
|
||
|
||
EntityManager::EntityManager(const QString &databaseType,QString databasename , QString hostname,QString username, QString password, QString port) {
|
||
this->db = new Database(databaseType,this->createConnection(),hostname,databasename,username,password,port.toInt());
|
||
EntityManager::EntityManager(const QString &databaseType, QString databasename , QString hostname, QString username,
|
||
QString password, QString port) {
|
||
this->db = new Database(databaseType, this->createConnection(), hostname, databasename, username, password,
|
||
port.toInt());
|
||
}
|
||
|
||
inline bool EntityManager::checkTable(Entity *entity) {
|
||
bool rc = true;
|
||
if(!this->db->containsTable(entity->getTablename())) {
|
||
if (!this->db->containsTable(entity->getTablename())) {
|
||
qDebug() << "Tabelle" << entity->getTablename() << "existiert noch nicht.";
|
||
if(this->createTable(entity)) {
|
||
if (this->createTable(entity)) {
|
||
this->db->refreshTableList();
|
||
rc = this->db->containsTable(entity->getTablename());
|
||
}
|
||
... | ... | |
QString conName = "";
|
||
bool ok = false;
|
||
qint16 i = 0;
|
||
while(!ok) {
|
||
if(l.contains("con"+QString::number(i))) {
|
||
while (!ok) {
|
||
if (l.contains("con" + QString::number(i))) {
|
||
++i;
|
||
} else {
|
||
l.append("con"+QString::number(i));
|
||
l.append("con" + QString::number(i));
|
||
ok = true;
|
||
conName = "con"+QString::number(i);
|
||
conName = "con" + QString::number(i);
|
||
EntityManager::setConnectionNames(l);
|
||
}
|
||
}
|
||
... | ... | |
|
||
void EntityManager::bindValues(const QHash<QString, QVariant> *h, QSqlQuery &q, bool ignoreID) {
|
||
QHash<QString, QVariant>::const_iterator i = h->constBegin();
|
||
while(i != h->constEnd()) {
|
||
if(!ignoreID || (ignoreID && !(i.key() == "id"))) {
|
||
q.bindValue(":"+i.key(),i.value());
|
||
while (i != h->constEnd()) {
|
||
if (!ignoreID || (ignoreID && !(i.key() == "id"))) {
|
||
q.bindValue(":" + i.key(), i.value());
|
||
}
|
||
++i;
|
||
}
|
src/entitymanager.h | ||
---|---|---|
|
||
namespace CuteEntityManager {
|
||
|
||
class EntityManager
|
||
{
|
||
private:
|
||
class EntityManager {
|
||
private:
|
||
static QStringList connectionNames;
|
||
static void setConnectionNames(QStringList list);
|
||
Database *db;
|
||
QString createConnection();
|
||
QString createTableQuery(Entity *entity);
|
||
QString attributes(QHash<QString, QVariant> *m, QString conjunction=",", bool ignoreID = false);
|
||
QString attributes(QHash<QString, QVariant> *m, QString conjunction = ",", bool ignoreID = false);
|
||
QList<QHash<QString, QVariant> > convertQueryResult(QSqlQuery &q);
|
||
bool checkTable(Entity *entity);
|
||
QString buildCreateQuery(QHash<QString,QVariant>::const_iterator i, QHash<QString,QVariant>::const_iterator end,QString &p1, QString &p2);
|
||
QString buildCreateQuery(QHash<QString, QVariant>::const_iterator i, QHash<QString, QVariant>::const_iterator end,
|
||
QString &p1, QString &p2);
|
||
void bindValues(const QHash<QString, QVariant> *h, QSqlQuery &q, bool ignoreID = false);
|
||
|
||
protected:
|
||
QString where(Entity *entity,QString conjunction=",",bool ignoreID = false);
|
||
QString where(QHash<QString, QVariant> *m,QString conjunction=",", bool ignoreID = false);
|
||
protected:
|
||
QString where(Entity *entity, QString conjunction = ",", bool ignoreID = false);
|
||
QString where(QHash<QString, QVariant> *m, QString conjunction = ",", bool ignoreID = false);
|
||
|
||
public:
|
||
public:
|
||
EntityManager(QSqlDatabase database);
|
||
EntityManager(const QString &databaseType, QString databasename = "" , QString hostname="", QString username ="", QString password="", QString port="");
|
||
EntityManager(const QString &databaseType, QString databasename = "" , QString hostname = "", QString username = "",
|
||
QString password = "", QString port = "");
|
||
~EntityManager();
|
||
static QStringList getConnectionNames();
|
||
static void removeConnectionName(const QString &name);
|
||
bool create(Entity *entity);
|
||
bool save(Entity *entity);
|
||
qint64 findId(Entity *entity);
|
||
QList<QHash<QString,QVariant> > findAll(QString tblname);
|
||
QHash<QString,QVariant> find(qint64 id, QString tblname);
|
||
QList<QHash<QString, QVariant> > findByAttributes(Entity *entity,bool ignoreID = false);
|
||
QList<QHash<QString, QVariant> > findByAttributes(QHash<QString, QVariant> *m, const QString &tblname, bool ignoreID = false);
|
||
QList<QHash<QString, QVariant> > findAll(QString tblname);
|
||
QHash<QString, QVariant> find(qint64 id, QString tblname);
|
||
QList<QHash<QString, QVariant> > findByAttributes(Entity *entity, bool ignoreID = false);
|
||
QList<QHash<QString, QVariant> > findByAttributes(QHash<QString, QVariant> *m, const QString &tblname,
|
||
bool ignoreID = false);
|
||
bool merge(Entity *entity);
|
||
bool remove(Entity *&entity);
|
||
bool removeAll(QString tblname);
|
||
bool createTable(Entity *entity);
|
||
qint8 count(Entity* entity, bool ignoreID= true);
|
||
qint8 count(Entity *entity, bool ignoreID = true);
|
||
};
|
||
}
|
||
#endif // ENTITYMANAGER_H
|
src/enums/databasetype.h | ||
---|---|---|
|
||
namespace CuteEntityManager {
|
||
enum DatabaseType {
|
||
SQLITE=0,
|
||
PGSQL=1,
|
||
MYSQL=2
|
||
SQLITE = 0,
|
||
PGSQL = 1,
|
||
MYSQL = 2
|
||
};
|
||
|
||
static const DatabaseType getDatabaseType(QString s) {
|
||
if(s == "qmysql") {
|
||
if (s == "qmysql") {
|
||
return CuteEntityManager::MYSQL;
|
||
} else if(s == "qpgsql") {
|
||
} else if (s == "qpgsql") {
|
||
return CuteEntityManager::PGSQL;
|
||
} else {
|
||
return CuteEntityManager::SQLITE;
|
src/schema.cpp | ||
---|---|---|
#include "schema.h"
|
||
#include "schema.h"
|
||
using namespace CuteEntityManager;
|
||
|
||
Schema::Schema() {
|
||
this->typeMap = QSharedPointer<QHash<QString,QString>>(new QHash<QString,QString>());
|
||
this->typeMap = QSharedPointer<QHash<QString, QString>>(new QHash<QString, QString>());
|
||
}
|
||
|
||
Schema::~Schema() {
|
||
... | ... | |
// return strpos($name, "`") !== false ? $name : "`" . $name . "`";
|
||
}
|
||
|
||
QString Schema::quoteSimpleColumnName(QString name)
|
||
{
|
||
//return strpos($name, '`') !== false || $name === '*' ? $name : '`' . $name . '`';
|
||
QString Schema::quoteTableName(QString name) {
|
||
|
||
}
|
||
|
||
QString Schema::quoteColumnName(QString name) {
|
||
|
||
}
|
||
|
||
QString Schema::quoteSimpleColumnName(QString name) {
|
||
//return strpos($name, '`') !== false || $name === '*' ? $name : '`' . $name . '`';
|
||
}
|
||
|
||
QList<TableSchema> Schema::getTableSchemas(QString schema) {
|
||
|
||
}
|
||
|
||
QList<QString> Schema::getTableNames(QString schema) {
|
||
|
||
}
|
||
|
||
QList<QString> Schema::findUniqueIndexes(TableSchema schema) {
|
||
|
||
}
|
||
|
||
QString Schema::getLastInsertID(QString sequenceName) {
|
||
|
||
}
|
||
|
||
void Schema::refresh() {
|
||
|
||
}
|
||
|
||
void Schema::quoteValue(QString str) {
|
||
|
||
}
|
||
|
||
QString Schema::getRawTable(QString name) {
|
||
|
||
}
|
||
|
||
QList<QString> Schema::findTableNames(QString schema) {
|
||
|
||
}
|
||
|
||
QList<QString> Schema::findUniqueIndexes(QString tableName) {
|
||
|
||
}
|
||
|
||
TableSchema Schema::findConstraints(TableSchema ts) {
|
||
}
|
||
|
||
QString Schema::getCreateTableSql(TableSchema ts) {
|
||
|
||
}
|
||
|
||
bool Schema::findColumns(TableSchema ts) {
|
||
|
||
}
|
||
|
||
TableSchema Schema::getTableSchema(QString name, bool refresh) {
|
||
|
||
}
|
||
|
src/schema.h | ||
---|---|---|
namespace CuteEntityManager {
|
||
|
||
class Schema {
|
||
public:
|
||
public:
|
||
Schema();
|
||
virtual ~Schema();
|
||
const QString TYPE_PK = "pk";
|
||
... | ... | |
|
||
virtual QHash<QString, QString> *getTypeMap() = 0;
|
||
virtual QString quoteSimpleTableName(QString name);
|
||
virtual QString quoteTableName(QString name);
|
||
virtual QString quoteColumnName(QString name);
|
||
virtual QString quoteSimpleColumnName(QString name);
|
||
virtual QList<TableSchema> getTableSchemas(QString schema = "", bool refresh = false);
|
||
virtual QList<QString> getTableNames(QString schema = "", $refresh = false);
|
||
virtual QList<TableSchema> getTableSchemas(QString schema = "");
|
||
virtual QList<QString> getTableNames(QString schema = "");
|
||
//virtual QueryBuilder getQueryBuilder();
|
||
//virtual QueryBuilder createQueryBuilder();
|
||
virtual QList<QString> findUniqueIndexes(TableSchema schema);
|
||
virtual QString getLastInsertID(QString sequenceName = "");
|
||
virtual void refresh();
|
||
virtual void quoteValue(QString str);
|
||
virtual QString getRawTable(QString name);
|
||
|
||
protected:
|
||
|
||
|
||
protected:
|
||
virtual QList<QString> findTableNames(QString schema = "");
|
||
virtual QList<QString> findUniqueIndexes(QString tableName);
|
||
virtual TableSchema findConstraints(TableSchema ts);
|
src/schema/mysqlschema.h | ||
---|---|---|
#include "../schema.h"
|
||
namespace CuteEntityManager {
|
||
class MysqlSchema : public Schema {
|
||
public:
|
||
public:
|
||
MysqlSchema();
|
||
~MysqlSchema();
|
||
QHash<QString, QString> *getTypeMap();
|
src/schema/pgsqlschema.h | ||
---|---|---|
#include "../schema.h"
|
||
namespace CuteEntityManager {
|
||
class PgSqlSchema : public Schema {
|
||
public:
|
||
public:
|
||
PgSqlSchema();
|
||
~PgSqlSchema();
|
||
QHash<QString, QString> *getTypeMap();
|
src/schema/sqliteschema.h | ||
---|---|---|
#include "../schema.h"
|
||
namespace CuteEntityManager {
|
||
class SqliteSchema : public Schema {
|
||
public:
|
||
public:
|
||
SqliteSchema();
|
||
~SqliteSchema();
|
||
QHash<QString, QString> *getTypeMap();
|
src/tableschema.cpp | ||
---|---|---|
#include "tableschema.h"
|
||
using namespace CuteEntityManager;
|
||
|
||
TableSchema::TableSchema()
|
||
{
|
||
TableSchema::TableSchema() {
|
||
|
||
}
|
||
|
||
TableSchema::~TableSchema()
|
||
{
|
||
TableSchema::~TableSchema() {
|
||
|
||
}
|
||
|
||
const ColumnSchema TableSchema::getColumn(QString name) const {
|
||
|
||
}
|
||
|
||
const QList<QString> TableSchema::getColumnNames() {
|
||
|
||
}
|
||
QString TableSchema::getSchemaName() const {
|
||
return schemaName;
|
||
}
|
||
|
||
void TableSchema::setSchemaName(const QString &value) {
|
||
schemaName = value;
|
||
}
|
||
QString TableSchema::getName() const {
|
||
return name;
|
||
}
|
||
|
||
void TableSchema::setName(const QString &value) {
|
||
name = value;
|
||
}
|
||
QString TableSchema::getFullName() const {
|
||
return fullName;
|
||
}
|
||
|
||
void TableSchema::setFullName(const QString &value) {
|
||
fullName = value;
|
||
}
|
||
QList<QString> TableSchema::getPrimaryKeys() const {
|
||
return primaryKeys;
|
||
}
|
||
|
||
void TableSchema::setPrimaryKeys(const QList<QString> &value) {
|
||
primaryKeys = value;
|
||
}
|
||
QString TableSchema::getSequenceName() const {
|
||
return sequenceName;
|
||
}
|
||
|
||
void TableSchema::setSequenceName(const QString &value) {
|
||
sequenceName = value;
|
||
}
|
||
QHash<QString, QString> TableSchema::getForeignKeys() const {
|
||
return foreignKeys;
|
||
}
|
||
|
||
void TableSchema::setForeignKeys(const QHash<QString, QString> &value) {
|
||
foreignKeys = value;
|
||
}
|
||
QList<ColumnSchema> TableSchema::getColumns() const {
|
||
return columns;
|
||
}
|
||
|
||
void TableSchema::setColumns(const QList<ColumnSchema> &value) {
|
||
columns = value;
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
src/tableschema.h | ||
---|---|---|
#ifndef TABLESCHEMA_H
|
||
#define TABLESCHEMA_H
|
||
#include <QString>
|
||
#include <QList>
|
||
#include <QHash>
|
||
#include "columnschema.h"
|
||
|
||
namespace CuteEntityManager {
|
||
|
||
class TableSchema {
|
||
public:
|
||
public:
|
||
TableSchema();
|
||
~TableSchema();
|
||
virtual ColumnSchema const getColumn(QString name) const;
|
||
virtual QList<QString> const getColumnNames();
|
||
|
||
QString getSchemaName() const;
|
||
void setSchemaName(const QString &value);
|
||
|
||
QString getName() const;
|
||
void setName(const QString &value);
|
||
|
||
QString getFullName() const;
|
||
void setFullName(const QString &value);
|
||
|
||
QList<QString> getPrimaryKeys() const;
|
||
void setPrimaryKeys(const QList<QString> &value);
|
||
|
||
QString getSequenceName() const;
|
||
void setSequenceName(const QString &value);
|
||
|
||
QHash<QString, QString> getForeignKeys() const;
|
||
void setForeignKeys(const QHash<QString, QString> &value);
|
||
|
||
QList<ColumnSchema> getColumns() const;
|
||
void setColumns(const QList<ColumnSchema> &value);
|
||
|
||
private:
|
||
QString schemaName;
|
||
QString name;
|
||
QString fullName;
|
||
QList<QString> primaryKeys;
|
||
QString sequenceName;
|
||
QHash<QString, QString> foreignKeys;
|
||
QList<ColumnSchema> columns;
|
||
|
||
|
||
};
|
Auch abrufbar als: Unified diff
...