Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8275b945

Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt

  • ID 8275b945f926a7b88d799bf897190ea1226d6a6b
  • Vorgänger da3ce9cf
  • Nachfolger 99140fe9

wip

Unterschiede anzeigen:

src/querybuilder.cpp
return values;
}
QList<QueryBuilder::ClassAttributes> QueryBuilder::inheritedAttributes(
const QSharedPointer<Entity> &entity) const {
auto list = QList<QueryBuilder::ClassAttributes>();
}
QString QueryBuilder::leftJoin(const QString &foreignTable,
const QString &tableName, const QString &foreignKey,
const QString &primaryKey) const {
......
void QueryBuilder::setSchema(const QSharedPointer<Schema> &value) {
schema = value;
}
QString QueryBuilder::ClassAttributes::getName() const {
return name;
}
void QueryBuilder::ClassAttributes::setName(const QString &value) {
name = value;
}
QHash<QString, QVariant> QueryBuilder::ClassAttributes::getAttributes() const {
return attributes;
}
void QueryBuilder::ClassAttributes::setAttributes(const QHash<QString, QVariant>
&value) {
attributes = value;
}
src/querybuilder.h
QSqlQuery getQuery() const;
protected:
class ClassAttributes {
public:
QString getName() const;
void setName(const QString &value);
QHash<QString, QVariant> getAttributes() const;
void setAttributes(const QHash<QString, QVariant> &value);
private:
QString name;
QHash<QString, QVariant> attributes;
};
QSqlQuery remove(const QString &tableName, const qint64 &id,
const QString &primaryKey = "id") const;
QSqlQuery insert(const QString &tableName, QHash<QString, QVariant> &attributes,
......
bool ignoreID = false, const QString &primaryKey = "id") const;
QHash<QString, QVariant> saveAttributes(const QSharedPointer<Entity> &entity)
const;
QList<ClassAttributes> inheritedAttributes(
const QSharedPointer<Entity> &entity) const;
QString leftJoin(const QString &foreignTable, const QString &tableName,
const QString &foreignKey = "id", const QString &primaryKey = "id") const;
QString superClassColumnName(const QMetaObject *&superMeta) const;
src/schema/sqlitequerybuilder.cpp
QString CuteEntityManager::SqliteQueryBuilder::dropIndex(QString name,
QString tableName) const {
Q_UNUSED(tableName)
return "DROP INDEX " + this->schema.data()->quoteTableName(name);
}
QString CuteEntityManager::SqliteQueryBuilder::dropColumn(QString tableName,
QString columName) const {
QString columnName) const {
Q_UNUSED(tableName)Q_UNUSED(columnName)
//not supported
return "";
}
......
QString CuteEntityManager::SqliteQueryBuilder::renameColumn(QString tableName,
QString oldName,
QString newName) const {
Q_UNUSED(tableName)Q_UNUSED(oldName)Q_UNUSED(newName)
//not supported
return "";
}
......
QStringList columns,
QString refTableName, QStringList refColumns, QString deleteConstraint,
QString updateConstraint) const {
Q_UNUSED(tableName)Q_UNUSED(name)Q_UNUSED(columns)Q_UNUSED(
refTableName)Q_UNUSED(refColumns)Q_UNUSED(deleteConstraint)Q_UNUSED(
updateConstraint)
//not supported
return "";
}
QString CuteEntityManager::SqliteQueryBuilder::dropForeignKey(QString name,
QString tableName) const {
Q_UNUSED(name)Q_UNUSED(tableName)
//not supported
return "";
}
......
QString CuteEntityManager::SqliteQueryBuilder::alterColumn(QString tableName,
QString columnName,
QString newType) const {
Q_UNUSED(tableName)Q_UNUSED(newType)Q_UNUSED(columnName)
//not supported
return "";
}
......
QString CuteEntityManager::SqliteQueryBuilder::addPrimaryKey(QString name,
QString tableName,
QStringList columns) const {
Q_UNUSED(tableName)Q_UNUSED(name)Q_UNUSED(columns)
//not supported
return "";
}
QString CuteEntityManager::SqliteQueryBuilder::dropPrimaryKey(QString name,
QString tableName) const {
Q_UNUSED(tableName)Q_UNUSED(name)
//not supported
return "";
}
src/schema/sqlitequerybuilder.h
virtual QString truncateTable(QString tableName) const;
virtual QString dropIndex(QString name, QString tableName) const;
virtual QString dropColumn(QString tableName, QString columName)const;
virtual QString dropColumn(QString tableName, QString columnName)const;
virtual QString renameColumn(QString tableName, QString oldName,
QString newName) const;
virtual QString addForeignKey(QString name, QString tableName, QStringList columns,

Auch abrufbar als: Unified diff