Nut/src/generators/sqlservergenerator.h

51 lines
1.7 KiB
C
Raw Normal View History

2016-05-21 16:09:03 +08:00
/**************************************************************************
**
** This file is part of Nut project.
** https://github.com/HamedMasafi/Nut
**
** Nut 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, either version 3 of the License, or
** (at your option) any later version.
**
** Nut 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 Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with Nut. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************/
2016-05-16 15:42:38 +08:00
#ifndef SQLSERVERGENERATOR_H
#define SQLSERVERGENERATOR_H
#include <QtCore/qglobal.h>
2016-05-21 16:09:03 +08:00
#include "sqlgeneratorbase_p.h"
2017-02-01 18:01:21 +08:00
NUT_BEGIN_NAMESPACE
2016-05-16 15:42:38 +08:00
2020-07-28 16:25:06 +08:00
class NUT_EXPORT SqlServerGenerator : public SqlGeneratorBase
2016-05-16 15:42:38 +08:00
{
public:
2019-02-11 16:00:00 +08:00
explicit SqlServerGenerator(Database *parent = nullptr);
2017-08-24 23:35:23 +08:00
2019-07-20 14:37:08 +08:00
QString masterDatabaseName(QString databaseName) override;
2016-05-21 16:09:03 +08:00
2019-07-20 14:37:08 +08:00
QString fieldType(FieldModel *field) override;
QString diff(FieldModel *oldField, FieldModel *newField) override;
2016-06-05 20:22:26 +08:00
2019-07-20 14:37:08 +08:00
QString escapeValue(const QVariant &v) const override;
2019-07-22 22:04:13 +08:00
QVariant unescapeValue(const QMetaType::Type &type, const QVariant &dbValue) override;
2017-08-24 23:35:23 +08:00
2019-07-22 22:04:13 +08:00
void appendSkipTake(QString &sql, int skip, int take) override;
2019-07-22 22:04:13 +08:00
protected:
QString createConditionalPhrase(const PhraseData *d) const override;
2016-05-16 15:42:38 +08:00
};
2017-02-01 18:01:21 +08:00
NUT_END_NAMESPACE
2016-05-21 16:09:03 +08:00
#endif // SQLSERVERGENERATOR_H