db_set_type: Set the Type of a Field.

Description Usage Arguments Value Details Examples

View source: R/RMariaDBHelper.R

Description

Set the type of a field (column) in a database table.

Usage

1
db_set_type(tablename, fieldname, fieldtype, conf_file = "~/.db_conf.yml")

Arguments

tablename

(character) A table name in a database.

fieldname

(character) A field name in a database table.

fieldtype

(character) A field type to set for a field in a table.

conf_file

(character) A file containing database connection parameters. (Default: "~/.db_conf.yml")

Value

(integer) The number of rows affected by the field type change.

Details

An ALTER TABLE command will change the type of a field in a table in a database.

Examples

1
2
3
4
## Not run: 
db_set_type("iris", "Species", "varchar(32)")

## End(Not run)

deohs/RMariaDBHelper documentation built on Dec. 31, 2020, 11:17 p.m.