Files
AVSDevR.UserFrosting/man/UFDatabase.Rd

124 lines
3.7 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UFDatabase.R
\name{UFDatabase}
\alias{UFDatabase}
\title{UFDatabase}
\value{
\if{html}{\out{<complex>}} The query object or data table of the user
\if{html}{\out{<character>}} The name related to user_id
\if{html}{\out{<complex>}} The query object or the user roles
}
\description{
UserFrosting Database class
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-UFDatabase-new}{\code{UFDatabase$new()}}
\item \href{#method-UFDatabase-getUser}{\code{UFDatabase$getUser()}}
\item \href{#method-UFDatabase-getUserName}{\code{UFDatabase$getUserName()}}
\item \href{#method-UFDatabase-getUserRoles}{\code{UFDatabase$getUserRoles()}}
\item \href{#method-UFDatabase-clone}{\code{UFDatabase$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-UFDatabase-new"></a>}}
\if{latex}{\out{\hypertarget{method-UFDatabase-new}{}}}
\subsection{Method \code{new()}}{
Initialises the UFDatabase class
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{UFDatabase$new(db_client)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{db_client}}{An instance of AVSDevR.DBClient::DBClient}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-UFDatabase-getUser"></a>}}
\if{latex}{\out{\hypertarget{method-UFDatabase-getUser}{}}}
\subsection{Method \code{getUser()}}{
Retreives the details of a user from the UserFrosting
database tables
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{UFDatabase$getUser(user_id, collect = TRUE)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{user_id}}{The ID of the user to retrieve (usually the current
session user)}
\item{\code{collect}}{When TRUE, calls dplyr::collect() on the query, when
FALSE returns the query object unfetched}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-UFDatabase-getUserName"></a>}}
\if{latex}{\out{\hypertarget{method-UFDatabase-getUserName}{}}}
\subsection{Method \code{getUserName()}}{
Retrieves the user name (first_name last_name) of a user
from the UserFrosting database tables
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{UFDatabase$getUserName(user_id)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{user_id}}{The ID of the user to retrieve (usually the current
session user)}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-UFDatabase-getUserRoles"></a>}}
\if{latex}{\out{\hypertarget{method-UFDatabase-getUserRoles}{}}}
\subsection{Method \code{getUserRoles()}}{
Retrieves the user's roles from the UserFrosting database
tables
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{UFDatabase$getUserRoles(user_id, collect = TRUE)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{user_id}}{The ID of the user to retrieve (usually the current
session user)}
\item{\code{collect}}{When TRUE, calls dplyr::collect() on the query, when
FALSE returns the query object unfetched}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-UFDatabase-clone"></a>}}
\if{latex}{\out{\hypertarget{method-UFDatabase-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{UFDatabase$clone(deep = FALSE)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}