Changeset View
Changeset View
Standalone View
Standalone View
common/storage/entitystore.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 37 | public: | |||
---|---|---|---|---|---|
52 | ApplicationDomainType applyDiff(const QByteArray &type, const ApplicationDomainType ¤t, const ApplicationDomainType &diff, const QByteArrayList &deletions) const; | 52 | ApplicationDomainType applyDiff(const QByteArray &type, const ApplicationDomainType ¤t, const ApplicationDomainType &diff, const QByteArrayList &deletions) const; | ||
53 | 53 | | |||
54 | void startTransaction(Sink::Storage::DataStore::AccessMode); | 54 | void startTransaction(Sink::Storage::DataStore::AccessMode); | ||
55 | void commitTransaction(); | 55 | void commitTransaction(); | ||
56 | void abortTransaction(); | 56 | void abortTransaction(); | ||
57 | bool hasTransaction() const; | 57 | bool hasTransaction() const; | ||
58 | 58 | | |||
59 | QVector<QByteArray> fullScan(const QByteArray &type); | 59 | QVector<QByteArray> fullScan(const QByteArray &type); | ||
60 | QVector<QByteArray> indexLookup(const QByteArray &type, const QueryBase &query, QSet<QByteArray> &appliedFilters, QByteArray &appliedSorting); | 60 | QVector<QByteArray> indexLookup(const QByteArray &type, const QueryBase &query, QSet<QByteArrayList> &appliedFilters, QByteArray &appliedSorting); | ||
61 | QVector<QByteArray> indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value); | 61 | QVector<QByteArray> indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value); | ||
62 | void indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value, const std::function<void(const QByteArray &uid)> &callback); | 62 | void indexLookup(const QByteArray &type, const QByteArray &property, const QVariant &value, const std::function<void(const QByteArray &uid)> &callback); | ||
63 | template<typename EntityType, typename PropertyType> | 63 | template<typename EntityType, typename PropertyType> | ||
64 | void indexLookup(const QVariant &value, const std::function<void(const QByteArray &uid)> &callback) { | 64 | void indexLookup(const QVariant &value, const std::function<void(const QByteArray &uid)> &callback) { | ||
65 | return indexLookup(ApplicationDomain::getTypeName<EntityType>(), PropertyType::name, value, callback); | 65 | return indexLookup(ApplicationDomain::getTypeName<EntityType>(), PropertyType::name, value, callback); | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | ///Returns the uid and buffer. Note that the memory only remains valid until the next operation or transaction end. | 68 | ///Returns the uid and buffer. Note that the memory only remains valid until the next operation or transaction end. | ||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |