insert {dabr}R Documentation

Execute INSERT query

Description

Execute INSERT query

Usage

insert(conn, ...)

## S3 method for class 'MariaDBConnection'
insert(conn, ..., quiet = FALSE)

Arguments

conn

DB connection object.

...

INSERT query and optional parameters.

quiet

Boolean flag to hide status messages.

See Also

Other DB functions: close_conn(), delete(), list_tables(), open_conn_mysql(), select_all(), select(), update()

Examples

## Not run: 
conn <- open_conn_mysql("sys", "root")
query <- paste0(
  "INSERT INTO sys_config (variable, value, set_time, set_by) VALUES ",
  "('test_var', 999, '", Sys.time(), "', NULL)"
)
out <- insert(conn, query)
close_conn(conn)

## End(Not run)

[Package dabr version 0.0.4 Index]