dbColumnEM: Add or Remove a Column

Description Usage Arguments Value

Description

Add or remove a column to/from a table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dbColumnEM(
  connName,
  name,
  colname,
  action = c("add", "drop"),
  coltype = "integer",
  cascade = FALSE,
  env,
  display = TRUE,
  exec = TRUE
)

Arguments

connName

String. Default is "connEM". Contains the name of the variable that contains the name of the "connection" in the environment "env".

name

A character string specifying a PostgreSQL table name.

colname

A character string specifying the name of the column

action

A character string specifying if the column is to be added ("add", default) or removed ("drop").

coltype

A character string indicating the type of the column, if action = "add".

cascade

Logical. Whether to drop foreign key constraints of other tables, if action = "drop".

env

Environment. Default is the .Global environment. This is the environment to return the connection object "connEM".

display

Logical. Whether to display the query (defaults to TRUE).

exec

Logical. Whether to execute the query (defaults to TRUE).

Value

TRUE if the column was successfully added or removed.


AndreMikulec/econModel documentation built on June 30, 2021, 9:48 a.m.