SQL_newColumnFormatter: SQL_newColumnFormatter

View source: R/SQLhelpers.R

SQL_newColumnFormatterR Documentation

SQL_newColumnFormatter

Description

[Stable]

Creates the column definition part of a SQL query. Used as a helper for SQL_createTable and SQL_addColumns

Usage

SQL_newColumnFormatter(df = NULL, types = NULL, charLength, colNames = NULL)

Arguments

df

data.frame/tibble. Optional. Must have df or types specified.

types

Character vector of new column types (readr-like). Optional. Must have df or types specified.

charLength

Vector of lengths used for character (NVARCHAR) types. If using the df argument, it will also accept a named vector of lengths for each column name with a character type.

colNames

Character vector of columns names to include in database table. Ignored if using the df argument.

Value

A string containing partial SQL query for column definitions.


MARC-KC/marcR documentation built on June 2, 2022, 9:31 p.m.