diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-29 08:52:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-29 08:52:28 +0200 |
commit | 9d3bf60e2d1f063abd39197b7e60bf6d2bc95aa7 (patch) | |
tree | 4a12c0bd029f8e04a383ed905157f70e764ac165 /odb/mssql/view-statements.hxx | |
parent | 91c962e4615101e14be4c720fc386878ddb598a4 (diff) |
Add object/view/container statements, statements cache
Diffstat (limited to 'odb/mssql/view-statements.hxx')
-rw-r--r-- | odb/mssql/view-statements.hxx | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/odb/mssql/view-statements.hxx b/odb/mssql/view-statements.hxx new file mode 100644 index 0000000..1e9cea6 --- /dev/null +++ b/odb/mssql/view-statements.hxx @@ -0,0 +1,83 @@ +// file : odb/mssql/view-statements.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : ODB NCUEL; see accompanying LICENSE file + +#ifndef ODB_MSSQL_VIEW_STATEMENTS_HXX +#define ODB_MSSQL_VIEW_STATEMENTS_HXX + +#include <odb/pre.hxx> + +#include <cstddef> // std::size_t + +#include <odb/forward.hxx> +#include <odb/traits.hxx> + +#include <odb/mssql/mssql-types.hxx> +#include <odb/mssql/version.hxx> +#include <odb/mssql/statement.hxx> +#include <odb/mssql/statements-base.hxx> + +namespace odb +{ + namespace mssql + { + template <typename T> + class view_statements: public statements_base + { + public: + typedef T view_type; + typedef odb::view_traits<view_type> view_traits; + typedef typename view_traits::pointer_type pointer_type; + typedef typename view_traits::image_type image_type; + + public: + view_statements (connection_type&); + + virtual + ~view_statements (); + + // View image. + // + image_type& + image () + { + return image_; + } + + std::size_t + image_version () const + { + return image_version_; + } + + void + image_version (std::size_t v) + { + image_version_ = v; + } + + binding& + image_binding () + { + return image_binding_; + } + + private: + view_statements (const view_statements&); + view_statements& operator= (const view_statements&); + + private: + image_type image_; + std::size_t image_version_; + binding image_binding_; + bind image_bind_[view_traits::column_count]; + }; + } +} + +#include <odb/mssql/view-statements.txx> + +#include <odb/post.hxx> + +#endif // ODB_MSSQL_VIEW_STATEMENTS_HXX |