#include <message_collection.h>
|
| std::string | collectionName () const |
| | Return name of collection. More...
|
| |
| unsigned | count () |
| | Count messages in collection. More...
|
| |
| Metadata::Ptr | createMetadata () const |
| |
| Query::Ptr | createQuery () const |
| |
| void | ensureIndex (const std::string &field) |
| |
| bool | initialize (const std::string &datatype, const std::string &md5) |
| |
| void | insert (char *msg, size_t msg_size, Metadata::ConstPtr metadata) |
| | Insert a ROS message, together with some optional metadata, into the db. More...
|
| |
| 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. More...
|
| |
| | MongoMessageCollection (const std::shared_ptr< mongo::DBClientConnection > &conn, const std::string &db_name, const std::string &collection_name) |
| |
| ResultIteratorHelper::Ptr | query (Query::ConstPtr query, const std::string &sort_by, bool ascending) const |
| |
| unsigned | removeMessages (Query::ConstPtr query) |
| | Remove messages matching query. More...
|
| |
| virtual | ~MessageCollectionHelper ()=default |
| |
|
| const std::string | coll_ |
| |
| std::shared_ptr< mongo::DBClientConnection > | conn_ |
| |
| const std::string | db_ |
| |
| std::shared_ptr< mongo::GridFS > | gfs_ |
| |
| const std::string | ns_ |
| |
Definition at line 52 of file message_collection.h.
◆ MongoMessageCollection()
| warehouse_ros_mongo::MongoMessageCollection::MongoMessageCollection |
( |
const std::shared_ptr< mongo::DBClientConnection > & |
conn, |
|
|
const std::string & |
db_name, |
|
|
const std::string & |
collection_name |
|
) |
| |
◆ collectionName()
| string warehouse_ros_mongo::MongoMessageCollection::collectionName |
( |
| ) |
const |
|
virtual |
◆ count()
| unsigned warehouse_ros_mongo::MongoMessageCollection::count |
( |
| ) |
|
|
virtual |
◆ createMetadata()
| Metadata::Ptr warehouse_ros_mongo::MongoMessageCollection::createMetadata |
( |
| ) |
const |
|
inlinevirtual |
◆ createQuery()
| Query::Ptr warehouse_ros_mongo::MongoMessageCollection::createQuery |
( |
| ) |
const |
|
inlinevirtual |
◆ downcastMetadata()
◆ downcastQuery()
◆ ensureIndex()
| void warehouse_ros_mongo::MongoMessageCollection::ensureIndex |
( |
const std::string & |
field | ) |
|
- Postcondition
- Ensure that there's an index on the given field. Note that index on _id and creation_time are always created.
Definition at line 75 of file message_collection.cpp.
◆ initialize()
| bool warehouse_ros_mongo::MongoMessageCollection::initialize |
( |
const std::string & |
datatype, |
|
|
const std::string & |
md5 |
|
) |
| |
|
virtual |
◆ insert()
| void warehouse_ros_mongo::MongoMessageCollection::insert |
( |
char * |
msg, |
|
|
size_t |
msg_size, |
|
|
Metadata::ConstPtr |
metadata |
|
) |
| |
|
virtual |
◆ listMetadata()
| void warehouse_ros_mongo::MongoMessageCollection::listMetadata |
( |
mongo::Query & |
mquery, |
|
|
std::vector< mongo::BSONObj > & |
metas |
|
) |
| |
|
private |
◆ modifyMetadata()
◆ query()
- Return values
-
| Iterator | range over matching messages |
- Parameters
-
| query | A metadata object representing a query. |
| metadata_only | If this is true, only retrieve the metadata (returned message objects will just be default constructed) |
Implements warehouse_ros::MessageCollectionHelper.
Definition at line 105 of file message_collection.cpp.
◆ removeMessages()
| unsigned warehouse_ros_mongo::MongoMessageCollection::removeMessages |
( |
Query::ConstPtr |
query | ) |
|
|
virtual |
◆ coll_
| const std::string warehouse_ros_mongo::MongoMessageCollection::coll_ |
|
private |
◆ conn_
| std::shared_ptr<mongo::DBClientConnection> warehouse_ros_mongo::MongoMessageCollection::conn_ |
|
private |
◆ db_
| const std::string warehouse_ros_mongo::MongoMessageCollection::db_ |
|
private |
◆ gfs_
| std::shared_ptr<mongo::GridFS> warehouse_ros_mongo::MongoMessageCollection::gfs_ |
|
private |
◆ ns_
| const std::string warehouse_ros_mongo::MongoMessageCollection::ns_ |
|
private |
The documentation for this class was generated from the following files: