upsert_sql3: Function to insert or update on duplicate key

Description Usage Arguments Details

Description

Insert data using parameterized statement. If duplicate key exists perform Update. Records with extant keys will be updated those without will be inserted using RMariaDB.

Usage

1
2
3
4
5
6
7
8
9
upsert_sql3(
  dataF,
  tName,
  key = NULL,
  Group = "EPA_harshadb",
  defaultFile = file.path(gfuns::sg("ws"), ".my.cnf"),
  verbose = FALSE,
  ...
)

Arguments

dataF

data frame to be appended

tName

table to appand data to

Group

Group identifier found in .my.cnf

defaultFile

file where Group credentials are found

verbose

provide feedback to user

Details

Return value is number of rows affected


duanxd1/gfuns documentation built on March 7, 2020, 12:46 a.m.