ddbs_create_schema: Check and create schema

View source: R/db_utils.R

ddbs_create_schemaR Documentation

Check and create schema

Description

Check and create schema

Usage

ddbs_create_schema(conn, name)

Arguments

conn

a connection object to a DuckDB database

name

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

Value

TRUE (invisibly) for successful schema creation

Examples

## load packages
library(duckdb)
library(duckspatial)

## connect to in memory database
conn <- dbConnect(duckdb::duckdb())

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

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

## disconnect from db
dbDisconnect(conn)


duckspatial documentation built on June 8, 2025, 1:08 p.m.