% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/db_extension.R
\name{ddbs_load}
\alias{ddbs_load}
\title{Loads the Spatial extension}
\usage{
ddbs_load(conn, quiet = FALSE, extension = "spatial", create_macros = TRUE)
}
\arguments{
\item{conn}{A \code{DBIConnection} object to a DuckDB database}

\item{quiet}{A logical value. If \code{TRUE}, suppresses any informational messages.
Defaults to \code{FALSE}.}

\item{extension}{name of the extension to load, default is "spatial"}

\item{create_macros}{if TRUE (default), it creates macros that allow
some functions to be used within dplyr pipelines}
}
\value{
TRUE (invisibly) for successful installation
}
\description{
Checks if a spatial extension is installed, and loads it in a DuckDB database
}
\examples{
\dontrun{
## load packages
library(duckspatial)
library(duckdb)

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

## install the spatial exntesion
ddbs_install(conn)
ddbs_load(conn)

## disconnect from db
duckdb::dbDisconnect(conn)
}
}
