Skip to content

Commit

Permalink
Improve documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Apr 1, 2019
1 parent f77473b commit 1655c4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/General.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1655c4b

Please sign in to comment.