Simple metadata queries. #222

Added support for retrieving metadata that matches all key/value pairs in a query.
This commit is contained in:
akwizgran
2016-05-12 17:40:11 +01:00
parent af1f267d4b
commit f2ab0eff53
8 changed files with 258 additions and 38 deletions

View File

@@ -249,6 +249,16 @@ public interface DatabaseComponent {
Map<MessageId, Metadata> getMessageMetadata(Transaction txn, GroupId g)
throws DbException;
/**
* Returns the metadata for any messages in the given group with metadata
* that matches all entries in the given query. If the query is empty, the
* metadata for all messages is returned.
* <p/>
* Read-only.
*/
Map<MessageId, Metadata> getMessageMetadata(Transaction txn, GroupId g,
Metadata query) throws DbException;
/**
* Returns the metadata for the given message.
* <p/>