% 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{}} The query object or data table of the user \if{html}{\out{}} The name related to user_id \if{html}{\out{}} 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{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-UFDatabase-new}{}}} \subsection{Method \code{new()}}{ Initialises the UFDatabase class \subsection{Usage}{ \if{html}{\out{
}}\preformatted{UFDatabase$new(db_client)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{db_client}}{An instance of AVSDevR.DBClient::DBClient} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \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{
}}\preformatted{UFDatabase$getUser(user_id, collect = TRUE)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \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{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \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{
}}\preformatted{UFDatabase$getUserName(user_id)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{user_id}}{The ID of the user to retrieve (usually the current session user)} } \if{html}{\out{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \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{
}}\preformatted{UFDatabase$getUserRoles(user_id, collect = TRUE)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \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{
}} } } \if{html}{\out{
}} \if{html}{\out{}} \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{
}}\preformatted{UFDatabase$clone(deep = FALSE)}\if{html}{\out{
}} } \subsection{Arguments}{ \if{html}{\out{
}} \describe{ \item{\code{deep}}{Whether to make a deep clone.} } \if{html}{\out{
}} } } }