% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Storage.R
\name{set_sqlite_storage}
\alias{set_sqlite_storage}
\title{Set SQLite storage}
\usage{
set_sqlite_storage(gitstats, dbname = ":memory:")
}
\arguments{
\item{gitstats}{A GitStats object.}

\item{dbname}{A character, path to SQLite file. Defaults to \code{":memory:"}
for an in-memory database.}
}
\value{
A \code{GitStats} object (invisibly).
}
\description{
Persist GitStats data in a SQLite database. R classes,
custom attributes, and column types are preserved via a \verb{_metadata} table.
Requires \code{DBI}, \code{RSQLite}, and \code{jsonlite} packages.
}
\examples{
\dontrun{
  # File-based
  my_gitstats <- create_gitstats() |>
    set_sqlite_storage(dbname = "gitstats.sqlite")

  # In-memory
  my_gitstats <- create_gitstats() |>
    set_sqlite_storage()
}
}
