Function
rq_to_sql
(rq_json: &str, options: Option<CompileOptions>)
Source from the content-addressed store, hash-verified
| 42 | #[pyfunction] |
| 43 | #[pyo3(signature = (rq_json, options=None))] |
| 44 | pub fn rq_to_sql(rq_json: &str, options: Option<CompileOptions>) -> PyResult<String> { |
| 45 | prqlc_lib::json::to_rq(rq_json) |
| 46 | .and_then(|x| { |
| 47 | prqlc_lib::rq_to_sql( |
| 48 | x, |
| 49 | &options |
| 50 | .map(convert_options) |
| 51 | .transpose()? |
| 52 | .unwrap_or_default(), |
| 53 | ) |
| 54 | }) |
| 55 | .map_err(|err| PyErr::new::<exceptions::PyValueError, _>(err.to_json())) |
| 56 | } |
| 57 | |
| 58 | mod debug { |
| 59 | use super::*; |
Callers
nothing calls this directly
Tested by
no test coverage detected