Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message for empty input #335

Merged
merged 1 commit into from
Jan 3, 2021
Merged

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Jan 2, 2021

Zero-row data frames already work.

Closes #313.

library(DBI)
db <- dbConnect(RSQLite::SQLite(), ":memory:")
dbExecute(db, "create table T(n  integer primary key)")
#> [1] 0
dbAppendTable(db, "T", data.frame())
#> Error: Must pass at least one column in `values`

Created on 2021-01-02 by the reprex package (v0.3.0)

@krlmlr krlmlr merged commit 84c2bdb into master Jan 3, 2021
@krlmlr krlmlr deleted the b-313-append-table-empty branch January 3, 2021 03:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to dbAppendTable with an empty data frame throws "Error: Cannot pass NA to dbQuoteIdentifier()"
1 participant