% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read-backends.R
\name{tl_read_db}
\alias{tl_read_db}
\title{Read from a DBI database connection}
\usage{
tl_read_db(conn, query, ...)
}
\arguments{
\item{conn}{A \pkg{DBI} connection object (e.g., from
\code{DBI::dbConnect()}).}

\item{query}{A SQL query string.}

\item{...}{Additional arguments passed to \code{DBI::dbGetQuery()}.}
}
\value{
A \code{tidylearn_data} object containing the query results.
}
\description{
Executes a SQL query against an existing \pkg{DBI} connection and returns
the result as a \code{tidylearn_data} object. The connection is not closed
by this function — the caller is responsible for managing the connection
lifecycle.
}
\examples{
\donttest{
# conn <- DBI::dbConnect(RSQLite::SQLite(), "my_database.sqlite")
# data <- tl_read_db(conn, "SELECT * FROM my_table")
# DBI::dbDisconnect(conn)
}

}
