Herunterladen als
root/src/schema/sqlitequerybuilder.h @ dd45fcf5
c22391b2 | Christian Ehringfeld | /*
|
|
* Copyright (C) 2015 Christian Ehringfeld <c.ehringfeld@t-online.de>
|
|||
*
|
|||
* This program is free software; you can redistribute it and/or modify it
|
|||
* under the terms of the GNU Lesser General Public License as published by
|
|||
* the Free Software Foundation.
|
|||
*
|
|||
* This program is distributed in the hope that it will be useful, but
|
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|||
* for more details.
|
|||
*
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
|||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
|||
b0bf458e | Christian Ehringfeld | #ifndef SQLITEQUERYBUILDER_H
|
|
#define SQLITEQUERYBUILDER_H
|
|||
#include "../querybuilder.h"
|
|||
namespace CuteEntityManager {
|
|||
e0e1ead8 | Christian Ehringfeld | class SqliteQueryBuilder : public QueryBuilder {
|
|
public:
|
|||
SqliteQueryBuilder(QSharedPointer<Schema> schema,
|
|||
QSharedPointer<Database> database);
|
|||
b0bf458e | Christian Ehringfeld | ~SqliteQueryBuilder();
|
|
d99101ae | Christian Ehringfeld | ||
virtual QString truncateTable(QString tableName) const;
|
|||
virtual QString dropIndex(QString name, QString tableName) const;
|
|||
virtual QString dropColumn(QString tableName, QString columName)const;
|
|||
e0e1ead8 | Christian Ehringfeld | virtual QString renameColumn(QString tableName, QString oldName,
|
|
QString newName) const;
|
|||
virtual QString addForeignKey(QString name, QString tableName, QStringList columns,
|
|||
QString refTableName,
|
|||
QStringList refColumns, QString deleteConstraint,
|
|||
QString updateConstraint) const;
|
|||
d99101ae | Christian Ehringfeld | virtual QString dropForeignKey(QString name, QString tableName) const;
|
|
e0e1ead8 | Christian Ehringfeld | virtual QString alterColumn(QString tableName, QString columnName,
|
|
QString newType) const;
|
|||
virtual QString addPrimaryKey(QString name, QString tableName,
|
|||
QStringList columns) const;
|
|||
d99101ae | Christian Ehringfeld | virtual QString dropPrimaryKey(QString name, QString tableName) const;
|
|
b0bf458e | Christian Ehringfeld | };
|
|
}
|
|||
#endif // SQLITEQUERYBUILDER_H
|