refs #568, find max key value

(useful when key is integer to find latest values)
This commit is contained in:
Klaus Basan
2016-01-15 02:15:46 +01:00
parent 6802880e52
commit 4c92ab0444
2 changed files with 37 additions and 0 deletions

View File

@@ -28,12 +28,18 @@ namespace BlackMisc
//! Object with key, notFound otherwise
OBJ findByKey(KEYTYPE key, const OBJ &notFound = OBJ()) const;
//! Object with max.key
OBJ maxKeyObject() const;
//! Sort by timestamp
void sortByKey();
//! All keys as list
QList<KEYTYPE> toDbKeyList() const;
//! Max.key value (making sense with integer key)
KEYTYPE getMaxKey(bool *ok = nullptr) const;
//! Remove objects with key
int removeObjectsWithKeys(const QList<KEYTYPE> &keys);