TreeFrogFramework  1.18
tsqldriverextension.h
Go to the documentation of this file.
1 #ifndef TSQLDRIVEREXTENSION_H
2 #define TSQLDRIVEREXTENSION_H
3 
4 #include <QString>
5 #include <TGlobal>
6 
7 class QSqlRecord;
8 
9 
11 {
12 public:
13  virtual ~TSqlDriverExtension() { }
14  virtual QString key() const = 0;
15  virtual bool isUpsertSupported() const { return false; }
16  virtual QString upsertStatement(const QString &tableName, const QSqlRecord &recordToInsert,
17  const QSqlRecord &recordToUpdate, const QString &pkField, const QString &lockRevisionField) const;
18 };
19 
20 
21 inline QString TSqlDriverExtension::upsertStatement(const QString &tableName, const QSqlRecord &recordToInsert,
22  const QSqlRecord &recordToUpdate, const QString &pkField, const QString &lockRevisionField) const
23 {
24  Q_UNUSED(tableName);
25  Q_UNUSED(recordToInsert);
26  Q_UNUSED(recordToUpdate);
27  Q_UNUSED(pkField);
28  Q_UNUSED(lockRevisionField);
29  return QString();
30 }
31 
32 #endif // TSQLDRIVEREXTENSION_H
#define T_CORE_EXPORT
Definition: tglobal.h:81
virtual ~TSqlDriverExtension()
Definition: tsqldriverextension.h:13
virtual QString upsertStatement(const QString &tableName, const QSqlRecord &recordToInsert, const QSqlRecord &recordToUpdate, const QString &pkField, const QString &lockRevisionField) const
Definition: tsqldriverextension.h:21
Definition: tsqldriverextension.h:10
virtual bool isUpsertSupported() const
Definition: tsqldriverextension.h:15