dbAppendTableNew: Insert rows into a table.

Description Usage Arguments Value Examples

Description

Insert rows into a table. If the table has key, it will ignore the duplicate rows indexed by the key. It assumes that the table has been created beforehand.

Usage

1
dbAppendTableNew(conn, name, value, ...)

Arguments

conn

A SQLiteConnection object, as returned by dbConnect().

name

Name of the table.

value

A data frame of values. The column names must be consistent with those in the target table in the database.

...

Other arguments used by individual methods.

Value

Number of rows appended successfully.

Examples

1
2
3
4
5
6
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
DBI::dbWriteTable(con, "iris", iris[0, ])
flightscanner:::dbAppendTableNew(con, "iris", iris)
df <- DBI::dbReadTable(con, "iris")
head(df)
dbDisconnect(con)

MinZhang95/flightscanner documentation built on July 1, 2019, 9:36 p.m.