Class DatabaseConnection
Defined in File database_connection.hpp
Inheritance Relationships
Base Type
public warehouse_ros::DatabaseConnection
Class Documentation
-
class DatabaseConnection : public warehouse_ros::DatabaseConnection
Public Functions
-
DatabaseConnection() = default
-
inline explicit DatabaseConnection(sqlite3_ptr db)
-
inline bool setParams(const std::string &host, unsigned, float = 60.0) override
Set database connection params.
-
inline bool setTimeout(float) override
Set database connection params.
-
bool connect() override
Setup the database connection. This call assumes setParams() has been previously called. Returns true if the connection was succesfully established.
-
bool isConnected() override
Returns whether the database is connected.
-
void dropDatabase(const std::string &db_name) override
Drop a db and all its collections. A DbClientConnection exception will be thrown if the database is not connected.
-
std::string messageType(const std::string &db_name, const std::string &collection_name) override
Return the ROS Message type of a given collection.
-
DatabaseConnection() = default