Skip to contents

Inserts rows into a database table. Use this for bulk inserts or when the higher-level functions like add_artwork() don't fit your use case.

Usage

db_art_append(value, table, schema = "app", cn = NULL)

Arguments

value

data.table or data.frame with rows to insert. Column names must match the target table schema.

table

Character. Target table name (without schema prefix).

schema

Character. Database schema (default "app"). Use "settings" for preference tables.

cn

Database connection. If NULL, creates a connection via artcore::dbc() and closes it on exit. Pass an existing connection to batch multiple queries efficiently.

Value

TRUE on success, FALSE on failure (with error logged)

See also