sql_header: Table design SQL Header

Description Usage Arguments Value Examples

View source: R/tabde_constraints.R

Description

Table design SQL Header

Usage

1
sql_header(const_name, const_type, const_cols, const_class = "constraint", ...)

Arguments

const_name

character vector. Name of the constraint.

const_type

character vector. Type of the constraint. Currently the only supported value is "PRIMARY KEY" but foreign keys will be supported in the future

const_cols

a list of character vectors that must be the same length as const_name. If each constraint only consists of a single column, const_cols may also be a character vector of the same length as const_name.

const_class

character vector. Either CONSTRAINT, PERIOD or RAW.

...

extra columns to be added to the resulting data.frame

Value

a data.frame

Examples

1
2
sql_header("PERSON_PK", "primary key", "name")
sql_header("PERSON_PK", "primary key", list(c("first_name", "last_name")))

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