From 6f701cbda9cb7db83b76962bb087974b77ff2899 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 7 Nov 2015 23:53:40 +0000 Subject: Add typedefs for commands and connection smart pointers --- libdbpp/command.h | 2 ++ libdbpp/connection.h | 2 ++ libdbpp/modifycommand.h | 2 ++ libdbpp/selectcommand.h | 2 ++ 4 files changed, 8 insertions(+) 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 #include +#include #include namespace DB { @@ -48,6 +49,7 @@ namespace DB { /// The SQL statement. const std::string sql; }; + typedef boost::shared_ptr 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 #include #include +#include namespace DB { class SelectCommand; @@ -75,6 +76,7 @@ namespace DB { private: }; + typedef boost::shared_ptr ConnectionPtr; typedef AdHoc::Factory 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 +#include 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 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 #include #include +#include #include namespace DB { @@ -44,6 +45,7 @@ namespace DB { /// Columns in the result set. Columns * columns; }; + typedef boost::shared_ptr SelectCommandPtr; } #endif -- cgit v1.2.3