Skip to content

Commit

Permalink
docs/apis.result: fix typo (#3238)
Browse files Browse the repository at this point in the history
Co-authored-by: alxndrsn <alxndrsn>
  • Loading branch information
alxndrsn authored Jun 5, 2024
1 parent cc41934 commit d1548d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pages/apis/result.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The command type last executed: `INSERT` `UPDATE` `CREATE` `SELECT` etc.

The number of rows processed by the last command. Can be `null` for commands that never affect rows, such as the `LOCK`-command. More specifically, some commands, including `LOCK`, only return a command tag of the form `COMMAND`, without any `[ROWS]`-field to parse. For such commands `rowCount` will be `null`.

_note: this does not reflect the number of rows __returned__ from a query. e.g. an update statement could update many rows (so high `result.rowCount` value) but `result.rows.length` would be zero. To check for an empty query reponse on a `SELECT` query use `result.rows.length === 0`_.
_note: this does not reflect the number of rows __returned__ from a query. e.g. an update statement could update many rows (so high `result.rowCount` value) but `result.rows.length` would be zero. To check for an empty query response on a `SELECT` query use `result.rows.length === 0`_.

[@sehrope](https://github.com/brianc/node-postgres/issues/2182#issuecomment-620553915) has a good explanation:

Expand Down

0 comments on commit d1548d6

Please sign in to comment.