diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-12-03 13:11:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-12-03 13:11:42 +0200 |
commit | b9714c9f9a878ab363b85dc4add9eb16fe123d67 (patch) | |
tree | 0d7343352fe907e5ecddef2ae14a706d146d19cf /odb/mysql/connection.ixx | |
parent | bfe99354380c4a3a77a181cd8abaacab09a45fb5 (diff) |
Add support for executing common query using static interface
Diffstat (limited to 'odb/mysql/connection.ixx')
-rw-r--r-- | odb/mysql/connection.ixx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/odb/mysql/connection.ixx b/odb/mysql/connection.ixx index 3a3c975..5bbb251 100644 --- a/odb/mysql/connection.ixx +++ b/odb/mysql/connection.ixx @@ -22,9 +22,18 @@ namespace odb template <typename T> inline prepared_query<T> connection:: - prepare_query (const char* n, const query<T>& q) + prepare_query (const char* n, const mysql::query_base& q) { return query_<T, id_mysql>::call (*this, n, q); } + + template <typename T> + inline prepared_query<T> connection:: + prepare_query (const char* n, const odb::query_base& q) + { + // Translate to native query. + // + return prepare_query<T> (n, mysql::query_base (q)); + } } } |