| 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. |
| Version: | 0.10.1 |
| URL: | https://prql.github.io/prqlc-r/,https://github.com/PRQL/prqlc-r |
| BugReports: | https://github.com/PRQL/prqlc-r/issues |
| Depends: | R (≥ 4.2) |
| Suggests: | knitr (≥ 1.44), rmarkdown, DBI, glue, RSQLite, tidyquery,sqldf, nycflights13, dplyr, testthat (≥ 3.2.0), patrick (≥0.3.0), withr, cli |
| License: | MIT + file LICENSE |
| Language: | en-US |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.2 |
| SystemRequirements: | Cargo (Rust's package manager), rustc |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| Config/testthat/parallel: | true |
| Config/Needs/dev: | brio, devtools, xfun (>= 0.44), lintr, styler, purrr,RcppTOML, readr, tidyr, rhub |
| Config/Needs/website: | pkgdown |
| Config/prqlr/LibVersion: | 0.13.2 |
| NeedsCompilation: | yes |
| Packaged: | 2025-03-28 12:39:23 UTC; rstudio |
| Author: | Tatsuya Shima [aut, cre], Authors of the dependency Rust crates [aut] (see inst/AUTHORS file for details) |
| Maintainer: | Tatsuya Shima <ts1s1andn@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2025-03-28 13:10:02 UTC |
prqlr: 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.
Author(s)
Maintainer: Tatsuya Shimats1s1andn@gmail.com
Authors:
Authors of the dependency Rust crates (see inst/AUTHORS file for details)
See Also
Useful links:
Report bugs athttps://github.com/PRQL/prqlc-r/issues
Compile a PRQL query into a SQL query
Description
Compile a PRQL query into a SQL query
Usage
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"))Arguments
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 |
Value
A character of the compiled SQL query.
Examples
"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 mtcarsfilter cyl > 6select !{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.duckdbfrom mtcarsfilter cyl > 6select !{cyl}" |> prql_compile() |> cat()Get available target names
Description
Get available target names for thetarget option of theprql_compile() function.
Usage
prql_get_targets()Value
a character vector of target names.
Examples
prql_get_targets()prqlc's version
Description
prqlc's version
Usage
prql_version()Value
anumeric_version with the version of the built-in prqlc.
Examples
prql_version()