connection_insert: Insert a record into a table

View source: R/crud.R

connection_insertR Documentation

Insert a record into a table

Description

Inserts a new record into a table with automatic timestamp handling. If the table has created_at/updated_at columns, they will be set automatically.

Usage

connection_insert(conn, table_name, values, auto_timestamps = TRUE)

Arguments

conn

Database connection

table_name

Name of the table

values

Named list of column-value pairs

auto_timestamps

Whether to automatically set created_at/updated_at (default: TRUE)

Value

The ID of the inserted record (if auto-increment ID exists), or number of rows affected


framework documentation built on Feb. 18, 2026, 1:07 a.m.