Nothing
# Generated by savvy: do not edit by hand
#
# Note:
# This wrapper file is named as `000-wrappers.R` so that this file is loaded
# first, which allows users to override the functions defined here (e.g., a
# print() method for an enum).
#' @useDynLib prqlr, .registration = TRUE
#' @keywords internal
NULL
# Check class and extract the external pointer embedded in the environment
.savvy_extract_ptr <- function(e, class) {
if(is.null(e)) {
return(NULL)
}
if(inherits(e, class)) {
e$.ptr
} else {
msg <- paste0("Expected ", class, ", got ", class(e)[1])
stop(msg, call. = FALSE)
}
}
# Prohibit modifying environments
#' @export
`$<-.savvy_prqlr__sealed` <- function(x, name, value) {
class <- gsub("__bundle$", "", class(x)[1])
stop(class, " cannot be modified", call. = FALSE)
}
#' @export
`[[<-.savvy_prqlr__sealed` <- function(x, i, value) {
class <- gsub("__bundle$", "", class(x)[1])
stop(class, " cannot be modified", call. = FALSE)
}
#' @title Compile a PRQL query into a SQL query
#' @param prql_query a PRQL query string.
#' @param target a compile target name to use.
#' @param format a logical flag. Whether to format the SQL query.
#' @param signature_comment a logical flag. Whether to add a signature comment to the output SQL query.
#' @return a list contains a SQL string or an error message.
#' @noRd
`compile` <- function(`prql_query`, `target`, `format`, `signature_comment`, `display`) {
.Call(savvy_compile__impl, `prql_query`, `target`, `format`, `signature_comment`, `display`)
}
#' @title prqlc's version
#' @return a prqlc's version string
#' @noRd
`compiler_version` <- function() {
.Call(savvy_compiler_version__impl)
}
#' @noRd
`pl_to_rq` <- function(`pl_json`) {
.Call(savvy_pl_to_rq__impl, `pl_json`)
}
#' @title Get available target names
#' @description Get available target names for the `target` option of the [prql_compile()] function.
#' @return a character vector of target names.
#' @examples
#' prql_get_targets()
#' @export
`prql_get_targets` <- function() {
.Call(savvy_prql_get_targets__impl)
}
#' @noRd
`prql_to_pl` <- function(`prql_query`) {
.Call(savvy_prql_to_pl__impl, `prql_query`)
}
#' @noRd
`rq_to_sql` <- function(`rq_json`) {
.Call(savvy_rq_to_sql__impl, `rq_json`)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.