dump_sql: Write generated sql

Description Usage Arguments Value

View source: R/update.R

Description

Writes the generated sql to a file. The script contains ALTER and UPDATE statements and can be used as documentation. Note that when this script is run on the database it will change the original table. This differs from the default behavior of dcmodify which works on a (temporary) copy of the table.

Usage

1
dump_sql(x, table, con = NULL, file = stdout(), ...)

Arguments

x

dcmodify::modifier() object with rules to be written

table

either a dplyr::tbl() object or a character with table name

con

optional, when table is a character, a dbi connection.

file

to which the sql will be written.

...

not used

Value

character sql script with all statements.


dcmodifydb documentation built on Jan. 21, 2022, 5:06 p.m.