#include <database_connection.h>

Public Member Functions | |
| bool | connect () override |
| DatabaseConnection ()=default | |
| DatabaseConnection (sqlite3_ptr db) | |
| 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. More... | |
| bool | isConnected () override |
| Returns whether the database is connected. More... | |
| std::string | messageType (const std::string &db_name, const std::string &collection_name) override |
| Return the ROS Message type of a given collection. More... | |
| bool | setParams (const std::string &host, unsigned, float=60.0) override |
| Set database connection params. More... | |
| bool | setTimeout (float) override |
| Set database connection params. More... | |
Public Member Functions inherited from warehouse_ros::DatabaseConnection | |
| MessageCollection< M > | openCollection (const std::string &db_name, const std::string &collection_name) |
| MessageCollection< M >::Ptr | openCollectionPtr (const std::string &db_name, const std::string &collection_name) |
| virtual | ~DatabaseConnection () |
Static Public Attributes | |
| static const int | BUSY_MAX_RETRIES = 10 |
| static const int | BUSY_WAIT_MILLISECS = 20 |
Protected Member Functions | |
| std::vector< std::string > | getTablesOfDatabase (const std::string &db_name) |
| void | initDb () |
| warehouse_ros::MessageCollectionHelper::Ptr | openCollectionHelper (const std::string &db_name, const std::string &collection_name) override |
| bool | schemaVersionSet () |
Private Attributes | |
| sqlite3_ptr | db_ |
| std::string | uri_ |
Additional Inherited Members | |
Public Types inherited from warehouse_ros::DatabaseConnection | |
| typedef boost::shared_ptr< DatabaseConnection > | Ptr |
Definition at line 38 of file database_connection.h.
|
default |
|
inline |
Definition at line 45 of file database_connection.h.
|
overridevirtual |
Setup the database connection. This call assumes setParams() has been previously called. Returns true if the connection was succesfully established.
Implements warehouse_ros::DatabaseConnection.
Definition at line 65 of file database_connection.cpp.
|
overridevirtual |
Drop a db and all its collections. A DbClientConnection exception will be thrown if the database is not connected.
Implements warehouse_ros::DatabaseConnection.
Definition at line 124 of file database_connection.cpp.
|
protected |
Definition at line 90 of file database_connection.cpp.
|
protected |
Definition at line 179 of file database_connection.cpp.
|
overridevirtual |
Returns whether the database is connected.
Implements warehouse_ros::DatabaseConnection.
Definition at line 85 of file database_connection.cpp.
|
overridevirtual |
Return the ROS Message type of a given collection.
Implements warehouse_ros::DatabaseConnection.
Definition at line 150 of file database_connection.cpp.
|
overrideprotectedvirtual |
Implements warehouse_ros::DatabaseConnection.
Definition at line 218 of file database_connection.cpp.
|
protected |
Definition at line 195 of file database_connection.cpp.
|
inlineoverridevirtual |
Set database connection params.
Implements warehouse_ros::DatabaseConnection.
Definition at line 49 of file database_connection.h.
|
inlineoverridevirtual |
Set database connection params.
Implements warehouse_ros::DatabaseConnection.
Definition at line 56 of file database_connection.h.
|
static |
Definition at line 76 of file database_connection.h.
|
static |
Definition at line 75 of file database_connection.h.
|
private |
Definition at line 40 of file database_connection.h.
|
private |
Definition at line 41 of file database_connection.h.