Inserts a new row into a specified table in the database. It ensures that fields, primary keys, and NOT NULL constraints are valid before inserting.

insert_entry(con = NULL, tbl = NULL, ...)

Arguments

con

DBI connection object.

tbl

Name of the target table.

...

Named column-value pairs to insert into the table.

Value

None.

Examples

if (FALSE) { # \dontrun{
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
insert_entry(con, "my_table", id = 1, name = "Sample", value = 10)
} # }