Description Usage Arguments Value Details Examples
View source: R/RMariaDBHelper.R
Add an auto-number integer "id" field to a table.
1 2 3 4 5 6 7 | db_add_auto_id(
tablename,
fieldname = "id",
pk = TRUE,
uniq = TRUE,
conf_file = "~/.db_conf.yml"
)
|
tablename |
(character) The table name that will get the new "id" field. |
fieldname |
(character) The field name to use for the new "id" field. (Default: "id") |
pk |
(boolean) Add "id" as a PRIMARY KEY (TRUE) or not (FALSE). (Default: TRUE) |
uniq |
(boolean) Add "id" as a UNIQUE primary key (TRUE) or not (FALSE). (Default: TRUE) |
conf_file |
(character) A file containing database connection parameters. (Default: "~/.db_conf.yml") |
(boolean) Success: TRUE; failure: FALSE.
An auto-incrementing, non-null, non-negative integer "id" field will be added to a table, set as an index, and optionally set as a primary key.
1 2 3 4 | ## Not run:
db_add_auto_id("iris")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.