Title: | R Bindings for the 'prqlc' Rust Library |
---|---|
Description: | Provides a function to convert 'PRQL' strings to 'SQL' strings. Combined with other R functions that take 'SQL' as an argument, 'PRQL' can be used on R. |
Authors: | Tatsuya Shima [aut, cre], Authors of the dependency Rust crates [aut] (see inst/AUTHORS file for details) |
Maintainer: | Tatsuya Shima <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.9.0.9000 |
Built: | 2024-11-24 14:51:53 UTC |
Source: | https://github.com/PRQL/prqlc-r |
Compile a PRQL query into a SQL query
prql_compile( prql_query, target = getOption("prqlr.target", default = NULL), ..., format = getOption("prqlr.format", default = TRUE), signature_comment = getOption("prqlr.signature_comment", default = TRUE), display = getOption("prqlr.display", default = "plain") )
prql_compile( prql_query, target = getOption("prqlr.target", default = NULL), ..., format = getOption("prqlr.format", default = TRUE), signature_comment = getOption("prqlr.signature_comment", default = TRUE), display = getOption("prqlr.display", default = "plain") )
prql_query |
A character of PRQL query. |
target |
A character of the target name to use or |
... |
Ignored. |
format |
A logical flag (default: |
signature_comment |
a logical flag. (default: |
display |
A character, one of |
A character of the compiled SQL query.
"from mtcars | filter cyl > 6 | select {cyl, mpg}" |> prql_compile() "from mtcars | filter cyl > 6 | select {cyl, mpg}" |> prql_compile(format = FALSE, signature_comment = FALSE) " from mtcars filter cyl > 6 select !{cyl} " |> prql_compile("sql.duckdb") |> cat() # If the `target` argument is `NULL` (default) or `"sql.any"`, # the target specified in the header of the query will be used. " prql target:sql.duckdb from mtcars filter cyl > 6 select !{cyl} " |> prql_compile() |> cat()
"from mtcars | filter cyl > 6 | select {cyl, mpg}" |> prql_compile() "from mtcars | filter cyl > 6 | select {cyl, mpg}" |> prql_compile(format = FALSE, signature_comment = FALSE) " from mtcars filter cyl > 6 select !{cyl} " |> prql_compile("sql.duckdb") |> cat() # If the `target` argument is `NULL` (default) or `"sql.any"`, # the target specified in the header of the query will be used. " prql target:sql.duckdb from mtcars filter cyl > 6 select !{cyl} " |> prql_compile() |> cat()
Get available target names for the target
option of the prql_compile()
function.
prql_get_targets()
prql_get_targets()
a character vector of target names.
prql_get_targets()
prql_get_targets()
prqlc's version
prql_version()
prql_version()
a numeric_version with the version of the built-in prqlc.
prql_version()
prql_version()