Revision dd45fcf5
Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt
src/querybuilder.cpp | ||
---|---|---|
if(!superIndex.isEmpty()) {
|
||
queries.append(superIndex);
|
||
}
|
||
/**
|
||
@todo Relations
|
||
*/
|
||
queries.append(this->relationIndices(e));
|
||
ok = this->database.data()->transaction(queries);
|
||
return ok;
|
||
}
|
||
|
||
|
||
QStringList QueryBuilder::relationIndices(const Entity *e) const
|
||
{
|
||
QStringList queries = QStringList();
|
||
auto relations = e->getRelations();
|
||
auto iterator = relations.constBegin();
|
||
while(iterator != relations.constEnd()) {
|
||
|
||
|
||
++iterator;
|
||
}
|
||
return queries;
|
||
}
|
||
|
||
|
||
QString QueryBuilder::createTable(const QString &tableName, const QHash<QString, QString> &tableDefinition) const
|
||
{
|
||
return this->createTableQuery(tableName,
|
src/querybuilder.h | ||
---|---|---|
QHash<QString, QVariant> getEntityAttributes(const QHash<QString, QMetaProperty>
|
||
&props,
|
||
const QSharedPointer<Entity> &entity) const;
|
||
virtual QStringList relationIndices(const Entity *e) const;
|
||
|
||
QSharedPointer<Schema> getSchema() const;
|
||
void setSchema(const QSharedPointer<Schema> &value);
|
Auch abrufbar als: Unified diff
wip....