5 #include <TKvsDatabase>
17 void setLimit(
int limit);
19 void setOffset(
int offset);
20 bool find(
const QVariantMap &criteria = QVariantMap(),
const QVariantMap &orderBy = QVariantMap(),
const QStringList &fields = QStringList());
22 QVariantMap value()
const;
24 QVariantMap findOne(
const QVariantMap &criteria = QVariantMap(),
const QStringList &fields = QStringList());
25 QVariantMap findById(
const QString &
id,
const QStringList &fields = QStringList());
26 bool insert(QVariantMap &document);
27 int update(
const QVariantMap &criteria,
const QVariantMap &document,
bool upsert =
false);
28 bool updateById(
const QVariantMap &document);
29 int updateMany(
const QVariantMap &criteria,
const QVariantMap &document);
30 int updateMulti(
const QVariantMap &criteria,
const QVariantMap &document) {
return updateMany(criteria, document); }
31 int remove(
const QVariantMap &criteria);
32 bool removeById(
const QVariantMap &document);
33 int count(
const QVariantMap &criteria = QVariantMap());
39 TMongoDriver *driver();
40 const TMongoDriver *driver()
const;
45 TKvsDatabase _database;
50 friend class TCacheMongoStore;
The TMongoQuery class provides a means of operating a MongoDB system.
Definition: tmongoquery.h:10
int limit() const
Definition: tmongoquery.h:54
virtual ~TMongoQuery()
Definition: tmongoquery.h:14
int updateMulti(const QVariantMap &criteria, const QVariantMap &document)
Definition: tmongoquery.h:30
void setLimit(int limit)
Sets the limit to limit, which is the limited number of documents for finding documents.
Definition: tmongoquery.h:60
int offset() const
Definition: tmongoquery.h:66
void setOffset(int offset)
Sets the offset to offset, which is the number of documents to skip for finding documents.
Definition: tmongoquery.h:72
KvsEngine
Definition: tfnamespace.h:239
QString lastErrorString()
Definition: tcachesqlitestore.cpp:32
#define T_CORE_EXPORT
Definition: tdeclexport.h:28