sd_with_params.RdThis is a slightly more verbose form of sd_sql() with params that is
useful if a data frame is to be repeatedly queried.
sd_with_params(.data, ...)A sedonadb_dataframe or an object that can be coerced to one.
Named or unnamed parameters that will be coerced to literals
with as_sedonadb_literal().
A sedonadb_dataframe with the provided parameters filled into the query
sd_sql("SELECT ST_Point($1, $2) as pt") |>
sd_with_params(11, 12)
#> <sedonab_dataframe: ?? x 1>
#> ┌──────────────┐
#> │ pt │
#> │ geometry │
#> ╞══════════════╡
#> │ POINT(11 12) │
#> └──────────────┘
#> Preview of up to 6 row(s)
sd_sql("SELECT ST_Point($x, $y) as pt") |>
sd_with_params(x = 11, y = 12)
#> <sedonab_dataframe: ?? x 1>
#> ┌──────────────┐
#> │ pt │
#> │ geometry │
#> ╞══════════════╡
#> │ POINT(11 12) │
#> └──────────────┘
#> Preview of up to 6 row(s)