Herunterladen als
root/src/schema/sqlitequerybuilder.h @ 827458ed
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:
|
|||
5ca225ed | Christian Ehringfeld | explicit SqliteQueryBuilder(Schema *schema,
|
|
e0e1ead8 | Christian Ehringfeld | QSharedPointer<Database> database);
|
|
b0bf458e | Christian Ehringfeld | ~SqliteQueryBuilder();
|
|
d99101ae | Christian Ehringfeld | ||
ac5cbdcf | Christian Ehringfeld | virtual QString truncateTable(QString tableName) const override;
|
|
virtual QString dropIndex(QString name, QString tableName) const override;
|
|||
virtual QString dropColumn(QString tableName, QString columnName)const override;
|
|||
e0e1ead8 | Christian Ehringfeld | virtual QString renameColumn(QString tableName, QString oldName,
|
|
ac5cbdcf | Christian Ehringfeld | QString newName) const override;
|
|
virtual QString addForeignKey(QString name, QString tableName,
|
|||
QStringList columns,
|
|||
e0e1ead8 | Christian Ehringfeld | QString refTableName,
|
|
QStringList refColumns, QString deleteConstraint,
|
|||
ac5cbdcf | Christian Ehringfeld | QString updateConstraint) const override;
|
|
virtual QString dropForeignKey(QString name, QString tableName) const override;
|
|||
e0e1ead8 | Christian Ehringfeld | virtual QString alterColumn(QString tableName, QString columnName,
|
|
ac5cbdcf | Christian Ehringfeld | QString newType) const override;
|
|
e0e1ead8 | Christian Ehringfeld | virtual QString addPrimaryKey(QString name, QString tableName,
|
|
ac5cbdcf | Christian Ehringfeld | QStringList columns) const override;
|
|
virtual QString dropPrimaryKey(QString name, QString tableName) const override;
|
|||
virtual bool supportsForeignKeys() const override;
|
|||
b0bf458e | Christian Ehringfeld | };
|
|
}
|
|||
#endif // SQLITEQUERYBUILDER_H
|