Return all columns as guess of preferred primary keys.

key_inspector_all_cols(db, tablename)

Arguments

db

database handle

tablename

character, name of table

Value

map of keys to keys

See also

describe_tables

Examples

if (requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) { my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") DBI::dbWriteTable(my_db, "d", data.frame(x=1:3, y=NA)) print(key_inspector_all_cols(my_db, "d")) DBI::dbDisconnect(my_db) }
#> x y #> "x" "y"