From 1655c4b6b49db9f4658255d7c7cc4749f46a8ecf Mon Sep 17 00:00:00 2001 From: "Dr. Colin Hirsch" Date: Mon, 1 Apr 2019 22:15:23 +0200 Subject: [PATCH] Improve documentation. --- doc/General.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/General.md b/doc/General.md index 278a210f..f82c16f9 100644 --- a/doc/General.md +++ b/doc/General.md @@ -83,13 +83,13 @@ A prepared statement can also be removed with a call to `c->deallocate( name )`. The return value of `execute()` is of type `tao::pq::result`. -For statements like `SELECT` or `UPDATE` the result can be used to query the number of affected or returned rows. +For statements like `UPDATE` or `SELECT` the result contains the number of affected (or returned) rows. A complete list of statements for which this number is available can be found in the [PostgreSQL documentation](https://www.postgresql.org/docs/11/libpq-exec.html), see `PQcmdTuples()`. ```c++ const auto r2 = tr->execute( "DeleteUser", 42 ); assert( r2.has_affected_rows() ); -std::cout << r2.affected_rows() << std::endl; +const std::size_t ar = r2.affected_rows(); ``` For all other statements, nothing useful can be done with the result.