as_sql: Generate an SQL CREATE TABLE Statement From a tabde Table...

Description Usage Arguments Value Examples

View source: R/as_sql.R

Description

This does not perform any sanity check on the input data. col_name and sql_type must be compatible with the DBMS that you want to use.

Usage

1
2
3
4
as_sql(x, ...)

## S3 method for class 'table_design_sql'
as_sql(x, tname, ...)

Arguments

x

any R object

...

passes on to methods

tname

character scalar. name of target table

Value

character scalar. An SQL CREATE TABLE statement.

Examples

1
2
3
4
5
6
7
td <- tabde_sql(
  col_name = c("numbers", "letters"),
  col_type = c("integer", "character"),
  sql_type = c("smallint", "varchar(255)")
)

as_sql(td, "test_table")

s-fleck/tabde documentation built on April 4, 2021, 10:11 p.m.