View source: R/utils-metadata.R
Get Field Datatypes
1 2 3 4 5 6 7 8 9 10 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | library(pg13)
create_test_schema <-
function(conn) {
if (!schema_exists(conn = conn,
schema = "test_schema")) {
cli::cli_rule("Create 'test_schema' Schema")
create_schema(conn = conn,
schema = "test_schema")
}
}
conn <- local_connect(dbname = "pg13_test")
create_test_schema(conn = conn)
write_table(conn = conn,
schema = "test_schema",
table_name = "test_table",
drop_existing = TRUE,
data = data.frame(A = 1:3, B = letters[1:3]))
query_field_type(conn = conn,
table = "test_table")
drop_table(conn = conn,
schema = "test_schema",
table = "test_table")
drop_schema(conn = conn,
schema = "test_schema",
cascade = TRUE)
dc(conn = conn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.