cat_sql_chunk: Concatenate a SQL Chunk

Description Usage Arguments

View source: R/utils-typewrite.R

Description

Return a SQL statement given as a string surrounded by ticks for R Markdown consumption in the console. Output will be written verbatim to an Rmd file path if provided.

Usage

1
2
3
4
5
6
7
cat_sql_chunk(
  sql_statement,
  tab_count = 0,
  sep = "\n",
  rmd_file = "",
  append = FALSE
)

Arguments

sql_statement

SQL statement.

tab_count

Number of tabs the chunk will be indented when printed in the console, Default: 0.

sep

Passed to cat().

rmd_file

Passed as file argument to cat(). A file will not be written by default and an error will be thrown if the extension is not Rmd. Use cat_sql to write files with a sql extension.

append

Passed to cat().


patelm9/pg13 documentation built on Dec. 26, 2021, 8:17 p.m.