aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/query.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-10 11:17:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-10 11:17:52 +0200
commit0a589394a09ce5b3f16d902d657710a2886cc2fc (patch)
tree08f5bfa47a0d07b0dc20352706342e17f277759f /odb/mysql/query.txx
parentc67f076c75a36877ce142dc43a1ed2292ab8117a (diff)
Add query support
Diffstat (limited to 'odb/mysql/query.txx')
-rw-r--r--odb/mysql/query.txx28
1 files changed, 28 insertions, 0 deletions
diff --git a/odb/mysql/query.txx b/odb/mysql/query.txx
new file mode 100644
index 0000000..23d4ba7
--- /dev/null
+++ b/odb/mysql/query.txx
@@ -0,0 +1,28 @@
+// file : odb/mysql/query.txx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+namespace odb
+{
+ namespace mysql
+ {
+ template <typename T>
+ query& query::
+ operator+= (val_bind<T> v)
+ {
+ add (
+ shared_ptr<query_param> (
+ new (shared) query_param_impl<T, value_traits<T>::image_id> (v)));
+ }
+
+ template <typename T>
+ query& query::
+ operator+= (ref_bind<T> r)
+ {
+ add (
+ shared_ptr<query_param> (
+ new (shared) query_param_impl<T, value_traits<T>::image_id> (r)));
+ }
+ }
+}