diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-04 11:33:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:38:24 +0200 |
commit | f101a400442692f349822ab1d9119bca5d2b7240 (patch) | |
tree | e046f3b727226810d08813cc4c7a55244937f275 /odb/connection.hxx | |
parent | be97326d67365e16175cc599e23348feaf80e0fe (diff) |
Initial support for prepared queries
Diffstat (limited to 'odb/connection.hxx')
-rw-r--r-- | odb/connection.hxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/odb/connection.hxx b/odb/connection.hxx index 9f42f33..f274b39 100644 --- a/odb/connection.hxx +++ b/odb/connection.hxx @@ -11,6 +11,8 @@ #include <cstddef> // std::size_t #include <odb/forward.hxx> +#include <odb/query.hxx> +#include <odb/prepared-query.hxx> #include <odb/details/export.hxx> #include <odb/details/shared-ptr.hxx> @@ -50,6 +52,21 @@ namespace odb virtual unsigned long long execute (const char* statement, std::size_t length) = 0; + // Query preparation. + // + public: + template <typename T> + prepared_query<T> + prepare_query (const char* name, const char* q); + + template <typename T> + prepared_query<T> + prepare_query (const char* name, const std::string& q); + + template <typename T> + prepared_query<T> + prepare_query (const char* name, const query<T>& q); + // SQL statement tracing. // public: @@ -96,6 +113,7 @@ namespace odb } #include <odb/connection.ixx> +#include <odb/connection.txx> #include <odb/post.hxx> |