Go to the documentation of this file.00001
00004 #ifndef BPSSQLVALUES_H
00005 #define BPSSQLVALUES_H
00006
00007 #include "bpscore_global.h"
00008 #include <QVariantMap>
00009
00010 class QSqlRecord;
00011
00034 class BPSCORE_EXPORT BpsSqlValues
00035 {
00036 BPS_PRIVATE(BpsSqlValues)
00037 public:
00041 BpsSqlValues();
00042
00047 BpsSqlValues(const BpsSqlValues& aOther);
00048
00053 BpsSqlValues(const QVariantMap& aMap);
00054
00059 BpsSqlValues(const QSqlRecord& aRec);
00060
00061 virtual ~BpsSqlValues();
00062
00066 bool isEmpty() const;
00067
00071 QString columns() const;
00072
00076 QString tags() const;
00077
00082 QString pairs(const QString& aSeparator = bStr(", ")) const;
00083
00087 QStringList keys() const;
00088
00092 QVariantList values() const;
00093
00099 void insert(const QString& aKey, const QVariant& aValue);
00100
00106 int remove(const QString& aKey);
00107
00111 QVariantMap map() const;
00112
00117 void setMap(const QVariantMap& aMap);
00118
00122 void clear();
00123
00129 QVariant value(const QString& aName) const;
00130
00136 BpsSqlValues& operator=(const QVariantMap& aOther);
00137
00143 BpsSqlValues& operator=(const BpsSqlValues& aOther);
00144
00150 BpsSqlValues& operator=(const QSqlRecord& aOther);
00151 };
00152
00153 Q_DECLARE_METATYPE(BpsSqlValues)
00154
00155 #endif // BPSSQLVALUES_H