46 const std::string datatype = DataType().value();
48 const std::string md5 = Md5().
value();
84 char* data = (
char*)buffer.get();
91 const std::string& sort_by,
bool ascending)
const 103 const std::string& sort_by,
104 bool ascending)
const 107 return std::vector<typename MessageWithMetadata<M>::ConstPtr>(res.first, res.second);
112 const bool metadata_only)
const 115 if (res.first == res.second)
Different md5 sum for messages.
void insert(const M &msg, Metadata::Ptr metadata)
Insert a ROS message, together with some optional metadata, into the db.
unsigned removeMessages(Query::ConstPtr query)
Remove messages matching query.
QueryResults< M >::range_t query(Query::ConstPtr query, bool metadata_only=false, const std::string &sort_by="", bool ascending=true) const
Metadata::Ptr createMetadata() const
MessageCollection(MessageCollectionHelper::Ptr collection)
Will connect to given database and collection. Collection is created if it doesn't exist...
std::vector< typename MessageWithMetadata< M >::ConstPtr > queryList(Query::ConstPtr query, bool metadata_only=false, const std::string &sort_by="", bool ascending=true) const
Convenience function that calls queryResult and puts the results into a vector.
std::pair< ResultIterator< M >, ResultIterator< M > > range_t
bool md5SumMatches() const
Check if the md5 sum of the messages previously stored in the database matches that of the compiled m...
unsigned count()
Count messages in collection.
MessageCollection & operator=(const MessageCollection &other)
void serialize(Stream &stream, const T &t)
MessageCollectionHelper::Ptr collection_
Query::Ptr createQuery() const
~MessageCollection()
Destructor.
static const char * value()
Couldn't find matching message in collection.
void modifyMetadata(Query::ConstPtr q, Metadata::ConstPtr m)
Modify metadata Find message matching q and update its metadata using m In other words, overwrite keys in the message using m, but keep keys that don't occur in m.
uint32_t serializationLength(const T &t)
MessageWithMetadata< M >::ConstPtr findOne(Query::ConstPtr query, bool metadata_only=false) const
Convenience function that returns a single matching result for the query.