db_insert: Insert rows into a database table

Description Usage Arguments See Also Examples

View source: R/db.R

Description

Insert rows into a database table

Usage

1

Arguments

df

data.frame

table

character vector of an optional schema and table name

db

database object returned by db_connect

...

further parameters passed to dbWriteTable, eg to modify row.names or append (depends on driver)

See Also

RMySQL::dbWriteTable, RPostgreSQL::dbReadTable-methods

db_append

Examples

1
2
3
4
5
6
## Not run: 
options('db_config_path' = system.file('example_db_config.yaml', package = 'dbr'))
db_insert(mtcars, 'mtcars', 'sqlite')
db_append(mtcars, c('dm', 'mtcars'), 'sqlite')

## End(Not run)

daroczig/dbr documentation built on June 12, 2020, 2:47 p.m.