dbxInsert: Insert records

View source: R/insert.R

dbxInsertR Documentation

Insert records

Description

Insert records

Usage

dbxInsert(conn, table, records, batch_size = NULL, returning = NULL)

Arguments

conn

A DBIConnection object

table

The table name to insert

records

A data frame of records to insert

batch_size

The number of records to insert in a single statement (defaults to all)

returning

Columns to return

Examples

db <- dbxConnect(adapter="sqlite", dbname=":memory:")
table <- "forecasts"
DBI::dbCreateTable(db, table, data.frame(id=1:3, temperature=20:22))

records <- data.frame(temperature=c(32, 25))
dbxInsert(db, table, records)

dbx documentation built on June 22, 2024, 9:11 a.m.