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

Description Usage Arguments Value Examples

Description

This does not perform any sanity check on the input data. col_names 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 May 4, 2019, 1:23 p.m.