Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 12c34ebc

Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt

  • ID 12c34ebc9691bb8d7a57bd8374efc4dc67bbcb39
  • Vorgänger 975a7f96
  • Nachfolger 3b5d8beb

wip

Unterschiede anzeigen:

src/schema.cpp
abstractTypeMap = value;
}
QString Schema::buildColumnSchema(QString type, QString length, bool notNull,
QString defaultValue,
bool unique, QString checkConstraint) const {
return type + this->buildLengthString(length) + this->buildNotNullString(
notNull) + this->buildUniqueString(unique) + this->buildDefaultString(
defaultValue) + this->buildCheckString(checkConstraint);
}
QString Schema::buildLengthString(QString length) const {
return length.isEmpty() ? "" : "(" + length + ")";
}
QString Schema::buildNotNullString(bool notNull) const {
return notNull ? " NOT NULL" : "";
}
QString Schema::buildUniqueString(bool unique) const {
return unique ? " UNIQUE" : "";
}
QString Schema::buildDefaultString(QString def) const {
}
QString Schema::buildCheckString(QString check) const {
return check.isEmpty() ? "" : (" CHECK (" + check + ")");
}
QHash<QString, QSharedPointer<TableSchema> > Schema::getTables() const {
return this->tables;
src/schema.h
void setAbstractTypeMap(const QSharedPointer<QHash<QString, QString> > &value);
protected:
virtual QString buildColumnSchema(QString type, QString length, bool notNull = false, QString defaultValue = "",
bool unique = false, QString checkConstraint = "") const;
virtual QString buildLengthString(QString length) const;
virtual QString buildNotNullString(bool notNull) const;
virtual QString buildUniqueString(bool unique) const;
virtual QString buildDefaultString(QString def) const;
virtual QString buildCheckString(QString check) const;
virtual QStringList findTableNames(QString schema = "") = 0;
virtual QHash<QString, QStringList> findUniqueIndexes(const
QSharedPointer<TableSchema>

Auch abrufbar als: Unified diff