R/R6-Result.R

Defines functions as.character.Result format.Result

for_onload(function() {
  Result <- R6Class(
    "Result",
    public = list(
      error_list = NULL,
      data = NULL,
      as_json = function(...) {
        result_as_json(self, ...)
      },
      initialize = function(error_list = ErrorList$new()) {
        self$error_list <- error_list
        self$data <- NULL
        invisible(self)
      },
      print = function(...) {
        print(self$as_json(...))
      }
    )
  )
}) # end for_onload

#' @export
format.Result <- function(x, ...) {
  as.character(x$as_json(...))
}
#' @export
as.character.Result <- function(x, ...) {
  as.character(x$as_json(...))
}

Try the gqlr package in your browser

Any scripts or data that you put into this service are public.

gqlr documentation built on Jan. 10, 2026, 1:06 a.m.