Create index in database
create_index(
con,
tbl,
flds,
is_geom = F,
is_unique = F,
overwrite = F,
show = F,
exec = T
)
database connection object from DBI::dbConnect()
, e.g. from cc_db_connect()
table name as character
character vector of fields in table used for index
logical (default: FALSE) whether geometry field, so create GIST() index
logical (default: FALSE) whether to impose a unique constraint, to prevent duplicates; default: FALSE
logical (default: FALSE) whether to overwrite existing index
logical (default: FALSE) whether to show SQL statement
logical (default: TRUE) whether to execute SQL statement
nothing
if (FALSE) { # \dontrun{
con <- cc_db_connect()
create_index(con, "ctd_casts", "geom", is_geom=T)
create_index(con, "ctd_casts", "cast_count", is_unique=T)
} # }