aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/mysql/query.cxx6
-rw-r--r--odb/mysql/query.hxx6
-rw-r--r--odb/mysql/result.hxx5
-rw-r--r--odb/mysql/result.txx3
4 files changed, 12 insertions, 8 deletions
diff --git a/odb/mysql/query.cxx b/odb/mysql/query.cxx
index b7479ce..5727e4e 100644
--- a/odb/mysql/query.cxx
+++ b/odb/mysql/query.cxx
@@ -82,7 +82,7 @@ namespace odb
}
binding& query::
- parameters () const
+ parameters_binding () const
{
size_t n (parameters_.size ());
binding& r (binding_);
@@ -94,10 +94,10 @@ namespace odb
bool inc_ver (false);
- if (r.bind != b || r.count != bind_.size ())
+ if (r.bind != b || r.count != n)
{
r.bind = b;
- r.count = bind_.size ();
+ r.count = n;
inc_ver = true;
}
diff --git a/odb/mysql/query.hxx b/odb/mysql/query.hxx
index c7d83ff..d58fb30 100644
--- a/odb/mysql/query.hxx
+++ b/odb/mysql/query.hxx
@@ -120,12 +120,12 @@ namespace odb
operator= (const query&);
public:
- binding&
- parameters () const;
-
std::string
clause () const;
+ binding&
+ parameters_binding () const;
+
public:
template <typename T>
static val_bind<T>
diff --git a/odb/mysql/result.hxx b/odb/mysql/result.hxx
index ee1174c..ebc3e02 100644
--- a/odb/mysql/result.hxx
+++ b/odb/mysql/result.hxx
@@ -22,6 +22,8 @@ namespace odb
{
namespace mysql
{
+ class query;
+
template <typename T>
class result_impl: public odb::result_impl<T>
{
@@ -37,7 +39,8 @@ namespace odb
virtual
~result_impl ();
- result_impl (details::shared_ptr<select_statement> statement,
+ result_impl (const query&,
+ details::shared_ptr<select_statement> statement,
object_statements<object_type>& statements);
virtual void
diff --git a/odb/mysql/result.txx b/odb/mysql/result.txx
index 8140240..e207f73 100644
--- a/odb/mysql/result.txx
+++ b/odb/mysql/result.txx
@@ -17,7 +17,8 @@ namespace odb
template <typename T>
result_impl<T>::
- result_impl (details::shared_ptr<select_statement> statement,
+ result_impl (const query&,
+ details::shared_ptr<select_statement> statement,
object_statements<object_type>& statements)
: odb::result_impl<T> (statements.connection ().database ()),
statement_ (statement),