% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reader.R
\name{duckdb_reader}
\alias{duckdb_reader}
\title{Create a DuckDB reader}
\usage{
duckdb_reader(database = NULL)
}
\arguments{
\item{database}{Path to a DuckDB database file, or \code{NULL} (the default)
for an in-memory database.}
}
\value{
A \code{Reader} object.
}
\description{
Creates a DuckDB database connection that can execute SQL queries and
register data frames as queryable tables. The default creates an empty
in-memory database but you can also pass the path to a DuckDB database to
directly interact with that.
}
\examples{
reader <- duckdb_reader()
ggsql_register(reader, mtcars, "cars")
df <- ggsql_execute_sql(reader, "SELECT mpg, disp FROM cars LIMIT 5")

}
\seealso{
Other readers: 
\code{\link{custom_reader}()},
\code{\link{odbc_reader}()},
\code{\link{snowflake_reader}()}
}
\concept{readers}
