mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Simple metadata queries. #222
Added support for retrieving metadata that matches all key/value pairs in a query.
This commit is contained in:
@@ -27,12 +27,6 @@ public interface ClientHelper {
|
||||
Message createMessage(GroupId g, long timestamp, BdfList body)
|
||||
throws FormatException;
|
||||
|
||||
BdfDictionary getMessageAsDictionary(MessageId m) throws DbException,
|
||||
FormatException;
|
||||
|
||||
BdfDictionary getMessageAsDictionary(Transaction txn, MessageId m)
|
||||
throws DbException, FormatException;
|
||||
|
||||
BdfList getMessageAsList(MessageId m) throws DbException, FormatException;
|
||||
|
||||
BdfList getMessageAsList(Transaction txn, MessageId m) throws DbException,
|
||||
@@ -50,12 +44,19 @@ public interface ClientHelper {
|
||||
BdfDictionary getMessageMetadataAsDictionary(Transaction txn, MessageId m)
|
||||
throws DbException, FormatException;
|
||||
|
||||
Map<MessageId, BdfDictionary> getMessageMetatataAsDictionary(GroupId g)
|
||||
Map<MessageId, BdfDictionary> getMessageMetadataAsDictionary(GroupId g)
|
||||
throws DbException, FormatException;
|
||||
|
||||
Map<MessageId, BdfDictionary> getMessageMetadataAsDictionary(
|
||||
Transaction txn, GroupId g) throws DbException, FormatException;
|
||||
|
||||
Map<MessageId, BdfDictionary> getMessageMetadataAsDictionary(GroupId g,
|
||||
BdfDictionary query) throws DbException, FormatException;
|
||||
|
||||
Map<MessageId, BdfDictionary> getMessageMetadataAsDictionary(
|
||||
Transaction txn, GroupId g, BdfDictionary query) throws DbException,
|
||||
FormatException;
|
||||
|
||||
void mergeGroupMetadata(GroupId g, BdfDictionary metadata)
|
||||
throws DbException, FormatException;
|
||||
|
||||
|
||||
@@ -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/>
|
||||
|
||||
Reference in New Issue
Block a user