aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-05 14:12:09 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-05 14:12:09 +0200
commit9134d603584241135be03ce2e9f2f66a46c44fc6 (patch)
tree1fa4fce57c129ab891b1b17f8c12094070d86bb3
parent0f04eb5bc2069a63c86489258da06f007d8ac3c7 (diff)
Aesthetic changes
-rw-r--r--odb/pgsql/query.cxx8
-rw-r--r--odb/pgsql/query.hxx4
-rw-r--r--odb/pgsql/statement.hxx7
3 files changed, 9 insertions, 10 deletions
diff --git a/odb/pgsql/query.cxx b/odb/pgsql/query.cxx
index 5bf1f52..36a624b 100644
--- a/odb/pgsql/query.cxx
+++ b/odb/pgsql/query.cxx
@@ -149,7 +149,7 @@ namespace odb
// Copy any remaining characters in q.clause_.
//
- if (cur_pos < q.clause_.length ())
+ if (cur_pos < q.clause_.size ())
{
size_t n (clause_.size ());
@@ -159,7 +159,7 @@ namespace odb
clause_.append (q.clause_, cur_pos, string::npos);
}
- size_t n = bind_.size ();
+ size_t n (bind_.size ());
parameters_.insert (
parameters_.end (), q.parameters_.begin (), q.parameters_.end ());
@@ -212,13 +212,13 @@ namespace odb
clause_ += ' ';
parameter_offset o;
- o.first = clause_.length ();
+ o.first = clause_.size ();
ostringstream ss;
ss << parameters_.size () + 1;
clause_ += '$' + ss.str ();
- o.second = clause_.length ();
+ o.second = clause_.size ();
parameter_offsets_.push_back (o);
parameters_.push_back (p);
diff --git a/odb/pgsql/query.hxx b/odb/pgsql/query.hxx
index 1d34545..933ecd9 100644
--- a/odb/pgsql/query.hxx
+++ b/odb/pgsql/query.hxx
@@ -1527,6 +1527,10 @@ namespace odb
{
bool dummy;
std::size_t size, cap (buffer_.capacity ());
+
+ // NOTE: Using a fixed size bit type in queries requires
+ // alternative image buffer type support.
+ //
value_traits<T, id_bit>::set_image (buffer_, size, dummy, v);
size_ = size;
diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx
index 09779b4..e248b07 100644
--- a/odb/pgsql/statement.hxx
+++ b/odb/pgsql/statement.hxx
@@ -39,8 +39,7 @@ namespace odb
// Adapt an ODB binding to a native PostgreSQL parameter binding.
//
static void
- bind_param (native_binding&,
- const binding&);
+ bind_param (native_binding&, const binding&);
// Populate an ODB binding given a PostgreSQL result. If the truncated
// argument is true, then only truncated columns are extracted. Return
@@ -141,10 +140,6 @@ namespace odb
// splits fetch() into next() and load().
//
public:
- // Return false if there is no more rows. You should call next()
- // until it returns false or, alternatively, call free_result ().
- // Otherwise the statement will remain unfinished.
- //
bool
next ();