dbInsert: Insert Rows

Description Usage Arguments Details Value

View source: R/dbInsert.R

Description

Insert rows with a selection of columns into already existing tables. Unlike dbWriteTable, this function will insert rows with an incomplete column selection. Seems to handle most datatypes, but no guarantees.

Usage

1
2
dbInsert(conn, table, value, colnames = names(value),
  statement.only = FALSE)

Arguments

conn

the database connection.

table

the table name, possibly including the schema

value

the local value to write

colnames

the column names, if different than the names in value

statement.only

return the statement as a string rather than running the query (default:FALSE)

Details

If statement.only = TRUE, the function can be run without a conn argument. This can be useful for debugging, or generating statements that can be modified with additional code.

Value

If statement.only = FALSE, the query is run and the return is NULL. If statement.only = TRUE, the INSERT statement is returned as character.


noahbullock/extGreSQL documentation built on May 23, 2019, 9:29 p.m.