summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-11-07 23:53:40 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-11-07 23:53:40 +0000
commit6f701cbda9cb7db83b76962bb087974b77ff2899 (patch)
tree9cf71343f3e3fbb3faa4a1a0ad8b10b4c358d377
parentAdd dependency on input test file (diff)
downloadlibdbpp-6f701cbda9cb7db83b76962bb087974b77ff2899.tar.bz2
libdbpp-6f701cbda9cb7db83b76962bb087974b77ff2899.tar.xz
libdbpp-6f701cbda9cb7db83b76962bb087974b77ff2899.zip
Add typedefs for commands and connection smart pointers
-rw-r--r--libdbpp/command.h2
-rw-r--r--libdbpp/connection.h2
-rw-r--r--libdbpp/modifycommand.h2
-rw-r--r--libdbpp/selectcommand.h2
4 files changed, 8 insertions, 0 deletions
diff --git a/libdbpp/command.h b/libdbpp/command.h
index 85c73d5..a8ca0c3 100644
--- a/libdbpp/command.h
+++ b/libdbpp/command.h
@@ -3,6 +3,7 @@
#include <glibmm/ustring.h>
#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/shared_ptr.hpp>
#include <visibility.h>
namespace DB {
@@ -48,6 +49,7 @@ namespace DB {
/// The SQL statement.
const std::string sql;
};
+ typedef boost::shared_ptr<Command> CommandPtr;
}
#endif
diff --git a/libdbpp/connection.h b/libdbpp/connection.h
index 9ff757b..8a8aa5c 100644
--- a/libdbpp/connection.h
+++ b/libdbpp/connection.h
@@ -5,6 +5,7 @@
#include <factory.h>
#include <visibility.h>
#include <boost/filesystem/path.hpp>
+#include <boost/shared_ptr.hpp>
namespace DB {
class SelectCommand;
@@ -75,6 +76,7 @@ namespace DB {
private:
};
+ typedef boost::shared_ptr<Connection> ConnectionPtr;
typedef AdHoc::Factory<Connection, std::string> ConnectionFactory;
}
diff --git a/libdbpp/modifycommand.h b/libdbpp/modifycommand.h
index 69e45d5..104142e 100644
--- a/libdbpp/modifycommand.h
+++ b/libdbpp/modifycommand.h
@@ -3,6 +3,7 @@
#include "command.h"
#include <visibility.h>
+#include <boost/shared_ptr.hpp>
namespace DB {
/// Presents a command not expected to return any data.
@@ -15,6 +16,7 @@ namespace DB {
/// Execute the command and return effected row count
virtual unsigned int execute(bool allowNoChange = true) = 0;
};
+ typedef boost::shared_ptr<ModifyCommand> ModifyCommandPtr;
}
#endif
diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h
index 3887088..31ef9ca 100644
--- a/libdbpp/selectcommand.h
+++ b/libdbpp/selectcommand.h
@@ -7,6 +7,7 @@
#include <boost/multi_index/indexed_by.hpp>
#include <boost/multi_index/ordered_index_fwd.hpp>
#include <boost/multi_index/member.hpp>
+#include <boost/shared_ptr.hpp>
#include <visibility.h>
namespace DB {
@@ -44,6 +45,7 @@ namespace DB {
/// Columns in the result set.
Columns * columns;
};
+ typedef boost::shared_ptr<SelectCommand> SelectCommandPtr;
}
#endif