Projekt

Allgemein

Profil

Herunterladen als
Herunterladen (2,57 KB) Statistiken
| Zweig: | Revision:
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
#include "sqlitequerybuilder.h"
d99101ae Christian Ehringfeld
#include "../schema.h"
b0bf458e Christian Ehringfeld
e0e1ead8 Christian Ehringfeld
CuteEntityManager::SqliteQueryBuilder::SqliteQueryBuilder(
QSharedPointer<CuteEntityManager::Schema>
schema,
QSharedPointer<CuteEntityManager::Database> database) : QueryBuilder(schema,
database) {
b0bf458e Christian Ehringfeld
}

CuteEntityManager::SqliteQueryBuilder::~SqliteQueryBuilder() {

}
d99101ae Christian Ehringfeld
e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::truncateTable(
QString tableName) const {
d99101ae Christian Ehringfeld
return "DELETE FROM " + this->schema.data()->quoteTableName(tableName);
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::dropIndex(QString name,
QString tableName) const {
d99101ae Christian Ehringfeld
return "DROP INDEX " + this->schema.data()->quoteTableName(name);
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::dropColumn(QString tableName,
QString columName) const {
d99101ae Christian Ehringfeld
//not supported
return "";
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::renameColumn(QString tableName,
QString oldName,
QString newName) const {
d99101ae Christian Ehringfeld
//not supported
return "";
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::addForeignKey(QString name,
QString tableName,
QStringList columns,
QString refTableName, QStringList refColumns, QString deleteConstraint,
QString updateConstraint) const {
d99101ae Christian Ehringfeld
//not supported
return "";
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::dropForeignKey(QString name,
QString tableName) const {
d99101ae Christian Ehringfeld
//not supported
return "";
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::alterColumn(QString tableName,
QString columnName,
d99101ae Christian Ehringfeld
QString newType) const {
//not supported
return "";
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::addPrimaryKey(QString name,
QString tableName,
d99101ae Christian Ehringfeld
QStringList columns) const {
//not supported
return "";
}

e0e1ead8 Christian Ehringfeld
QString CuteEntityManager::SqliteQueryBuilder::dropPrimaryKey(QString name,
QString tableName) const {
d99101ae Christian Ehringfeld
//not supported
return "";
}