dbGetRowsAffected-DatabaseConnectorDbiResult-method: The number of rows affected

dbGetRowsAffected,DatabaseConnectorDbiResult-methodR Documentation

The number of rows affected

Description

This method returns the number of rows that were added, deleted, or updated by a data manipulation statement.

Usage

## S4 method for signature 'DatabaseConnectorDbiResult'
dbGetRowsAffected(res, ...)

Arguments

res

An object inheriting from DBI::DBIResult.

...

Other arguments passed on to methods.

Value

dbGetRowsAffected() returns a scalar number (integer or numeric), the number of rows affected by a data manipulation statement issued with DBI::dbSendStatement(). The value is available directly after the call and does not change after calling DBI::dbFetch(). NA_integer_ or NA_numeric_ are allowed if the number of rows affected is not known.

For queries issued with DBI::dbSendQuery(), zero is returned before and after the call to dbFetch(). NA values are not allowed.

See Also

Other DBIResult generics: DBIResult-class, dbBind(), dbClearResult(), dbColumnInfo(), dbFetch(), dbGetInfo(), dbGetRowCount(), dbGetStatement(), dbHasCompleted(), dbIsReadOnly(), dbIsValid(), dbQuoteLiteral(), dbQuoteString()

Other command execution generics: dbBind(), dbClearResult(), dbExecute(), dbSendStatement()


DatabaseConnector documentation built on Oct. 1, 2026, 5:08 p.m.