39 #ifndef WAREHOUSE_ROS_DATABASE_CONNECTION_H 40 #define WAREHOUSE_ROS_DATABASE_CONNECTION_H 50 virtual bool setParams(
const std::string& host,
unsigned port,
float timeout = 60.0) = 0;
64 virtual void dropDatabase(
const std::string& db_name) = 0;
67 virtual std::string
messageType(
const std::string& db_name,
const std::string& collection_name) = 0;
83 const std::string& collection_name) = 0;
90 #endif // include guard virtual std::string messageType(const std::string &db_name, const std::string &collection_name)=0
Return the ROS Message type of a given collection.
MessageCollection< M >::Ptr openCollectionPtr(const std::string &db_name, const std::string &collection_name)
Open a collection on the DB. The collection is created if it doesn't exist. A DbClientConnection exce...
virtual bool isConnected()=0
Returns whether the database is connected.
virtual void dropDatabase(const std::string &db_name)=0
Drop a db and all its collections. A DbClientConnection exception will be thrown if the database is n...
virtual bool setTimeout(float timeout)=0
Set database connection params.
virtual MessageCollectionHelper::Ptr openCollectionHelper(const std::string &db_name, const std::string &collection_name)=0
boost::shared_ptr< DatabaseConnection > Ptr
MessageCollection< M > openCollection(const std::string &db_name, const std::string &collection_name)
Open a collection on the DB. The collection is created if it doesn't exist. A DbClientConnection exce...
virtual bool setParams(const std::string &host, unsigned port, float timeout=60.0)=0
Set database connection params.