diff options
Diffstat (limited to 'odb/mysql/statement.hxx')
-rw-r--r-- | odb/mysql/statement.hxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/odb/mysql/statement.hxx b/odb/mysql/statement.hxx index 343595d..5ff0a4e 100644 --- a/odb/mysql/statement.hxx +++ b/odb/mysql/statement.hxx @@ -76,8 +76,21 @@ namespace odb return cached_; } + // Can only be called on a cached result. + // + std::size_t + result_size () const + { + return size_; + } + + // Number of rows already fetched. + // std::size_t - result_size (); + fetched () const + { + return rows_; + } result fetch (); @@ -99,6 +112,7 @@ namespace odb bool end_; bool cached_; std::size_t rows_; + std::size_t size_; binding& cond_; std::size_t cond_version_; |