specify_tbl: Write a table to a database with column and table constraints

Description Usage Arguments

Description

Write a table to a database with column and table constraints

Usage

1
2
specify_tbl(db, df, tbl_name, p_key = NULL, u_keys = NULL,
  nn_keys = NULL, no_null = FALSE, f_keys = NULL)

Arguments

db

A DBI::DBIConnection object.

df

A data frame object.

tbl_name

Name of the database.

p_key

Column to be constrained as PRIMARY KEY.

u_keys

Character vector with columns to be constrained as UNIQUE.

nn_keys

Character vector with columns to be constrained as NOT NULL.

no_null

Boolean. If TRUE, constrain all table columsn as NOT NULL.

f_keys

Lists of foreign key declarations.


dSHARP-CMU/relational documentation built on May 5, 2019, 9:45 p.m.