For a given table, set column updatecol to scalar updatevalue where column wherecol is in vector wherevector.

gpkg_update_table(
  x,
  table_name,
  updatecol,
  updatevalue,
  wherecol = NULL,
  wherevector = NULL,
  query_string = FALSE
)

Arguments

x

A geopackage object, path to a GeoPackage or an SQLiteConnection.

table_name

character. Table name.

updatecol

character. Column to update.

updatevalue

character, numeric, etc.; A scalar value to set.

wherecol

character. Column used to constrain update.

wherevector

character, numeric, etc.; Vector of values where update should be made.

query_string

logical. Return SQLite query rather than executing it? Default: FALSE

Value

integer. Number of rows updated by executing UPDATE query. Or character SQL query string if query_string=TRUE.