db_truncate_table: Function to run a 'TRUNCATE TABLE' statement for a database...

View source: R/db_truncate_table.R

db_truncate_tableR Documentation

Function to run a TRUNCATE TABLE statement for a database table.

Description

Beware that this function will remove the contents of a database table, and possibly other tables so use with caution.

Usage

db_truncate_table(
  con,
  table,
  cascade = FALSE,
  verbose = FALSE,
  progress = FALSE
)

Arguments

con

Database connection.

table

Table to remove all data from.

cascade

Should the TRUNCATE statement be used with CASCADE? Using cascade will delete relations which are dependent on table.

verbose

Should the function give messages?

progress

Should a progress bar be displayed?

Value

Invisible con.

Author(s)

Stuart K. Grange


skgrange/databaser documentation built on Sept. 26, 2024, 8:30 p.m.