Learn R Programming

duckspatial (version 0.9.0)

ddbs_create_schema: Check and create schema

Description

Check and create schema

Usage

ddbs_create_schema(conn, name, quiet = FALSE)

Value

TRUE (invisibly) for successful schema creation

Arguments

conn

A connection object to a DuckDB database

name

A character string with the name of the schema to be created

quiet

A logical value. If TRUE, suppresses any informational messages. Defaults to FALSE.

Examples

Run this code
## load packages
if (FALSE) {
library(duckspatial)
library(duckdb)

## connect to in memory database
conn <- ddbs_create_conn(dbdir = "memory")

## create a new schema
ddbs_create_schema(conn, "new_schema")

## check schemas
dbGetQuery(conn, "SELECT * FROM information_schema.schemata;")

## disconnect from db
ddbs_stop_conn(conn)
}

Run the code above in your browser using DataLab