diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-11-21 13:11:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-11-21 13:11:43 +0200 |
commit | 9ccd928f7b3d36b7be4a8dc8d180a441c9bf55e1 (patch) | |
tree | e6f398593fdc511d260ca9464344ff4bf3e2f127 /odb/mysql/query-dynamic.txx | |
parent | 945e65b2f5db606740e46053a4539ccc08403996 (diff) |
Add dynamic multi-database query support
Diffstat (limited to 'odb/mysql/query-dynamic.txx')
-rw-r--r-- | odb/mysql/query-dynamic.txx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/odb/mysql/query-dynamic.txx b/odb/mysql/query-dynamic.txx new file mode 100644 index 0000000..42790e0 --- /dev/null +++ b/odb/mysql/query-dynamic.txx @@ -0,0 +1,21 @@ +// file : odb/mysql/query-dynamic.txx +// copyright : Copyright (c) 2005-2012 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +namespace odb +{ + namespace mysql + { + template <typename T, database_type_id ID> + details::shared_ptr<query_param> + query_param_factory_impl (const void* val, bool by_ref) + { + const T& v (*static_cast<const T*> (val)); + + return details::shared_ptr<query_param> ( + by_ref + ? new (details::shared) query_param_impl<T, ID> (ref_bind<T> (v)) + : new (details::shared) query_param_impl<T, ID> (val_bind<T> (v))); + } + } +} |