aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/binding.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-06 18:00:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-06 18:00:43 +0200
commit5daaa1a6d9c8f5d3a4ad3d7009df564bc6506424 (patch)
treeb96d205208587208a4e443be192fe264d2f53d57 /odb/mysql/binding.hxx
parent6fd2fb44263eb6704905cddcc607462c21c5e687 (diff)
Add support for container persistence
Generalize statements that were used for persisting objects to work for both objects and containers. Implement a cache for container statements.
Diffstat (limited to 'odb/mysql/binding.hxx')
-rw-r--r--odb/mysql/binding.hxx45
1 files changed, 45 insertions, 0 deletions
diff --git a/odb/mysql/binding.hxx b/odb/mysql/binding.hxx
new file mode 100644
index 0000000..1aa7c6e
--- /dev/null
+++ b/odb/mysql/binding.hxx
@@ -0,0 +1,45 @@
+// file : odb/mysql/binding.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_MYSQL_BINDING_HXX
+#define ODB_MYSQL_BINDING_HXX
+
+#include <odb/pre.hxx>
+
+#include <cstddef> // std::size_t
+
+#include <odb/forward.hxx>
+
+#include <odb/mysql/mysql.hxx>
+#include <odb/mysql/version.hxx>
+
+#include <odb/mysql/details/export.hxx>
+
+namespace odb
+{
+ namespace mysql
+ {
+ class LIBODB_MYSQL_EXPORT binding
+ {
+ public:
+ binding (MYSQL_BIND* b, std::size_t n)
+ : bind (b), count (n), version (0)
+ {
+ }
+
+ MYSQL_BIND* bind;
+ std::size_t count;
+ std::size_t version;
+
+ private:
+ binding (const binding&);
+ binding& operator= (const binding&);
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_MYSQL_BINDING_HXX