Executes a statement and returns the number of rows affected.
dbExecute() comes with a default implementation
(which should work with most backends) that calls
dbSendStatement(), then dbGetRowsAffected(), ensuring that
the result is always freed by dbClearResult().
For passing query parameters, see dbBind(), in particular
the "The command execution flow" section.
# S4 method for class 'DatabaseConnectorConnection,character'
dbExecute(conn, statement, translate = TRUE, ...)A DBIConnection object, as returned by
dbConnect().
a character string containing SQL.
Translate the query using SqlRender?
Other parameters passed on to methods.
dbExecute() always returns a
scalar
numeric
that specifies the number of rows affected
by the statement.
You can also use dbExecute() to call a stored procedure
that performs data manipulation or other actions that do not return a result set.
To execute a stored procedure that returns a result set,
or a data manipulation query that also returns a result set
such as INSERT INTO ... RETURNING ..., use dbGetQuery() instead.
For queries: dbSendQuery() and dbGetQuery().
Other DBIConnection generics:
DBIConnection-class,
dbAppendTable(),
dbAppendTableArrow(),
dbCreateTable(),
dbCreateTableArrow(),
dbDataType(),
dbDisconnect(),
dbExistsTable(),
dbGetException(),
dbGetInfo(),
dbGetQuery(),
dbGetQueryArrow(),
dbIsReadOnly(),
dbIsValid(),
dbListFields(),
dbListObjects(),
dbListResults(),
dbListTables(),
dbQuoteIdentifier(),
dbReadTable(),
dbReadTableArrow(),
dbRemoveTable(),
dbSendQuery(),
dbSendQueryArrow(),
dbSendStatement(),
dbUnquoteIdentifier(),
dbWriteTable(),
dbWriteTableArrow()
Other command execution generics:
dbBind(),
dbClearResult(),
dbGetRowsAffected(),
dbSendStatement()