You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/05/24 16:35:15 UTC
[GitHub] [arrow-adbc] paleolimbot opened a new pull request, #706: feat(r): Add `read_adbc()`, `write_adbc()`, and `execute_adbc()` convenience functions
paleolimbot opened a new pull request, #706:
URL: https://github.com/apache/arrow-adbc/pull/706
After #693 and https://github.com/apache/arrow-nanoarrow/pull/196 we have enough lifecycle management to implement some convenience methods. This makes it about 1000% easier to play around with queries. An example with the SQLite driver:
``` r
library(adbcdrivermanager)
temp <- tempfile()
db <- adbc_database_init(adbcsqlite::adbcsqlite(), uri = temp)
write_adbc(data.frame(x = 1:10), db, "some_table")
read_adbc(db, "SELECT * from some_table") |>
tibble::as_tibble()
#> # A tibble: 10 × 1
#> x
#> <dbl>
#> 1 1
#> 2 2
#> 3 3
#> 4 4
#> 5 5
#> 6 6
#> 7 7
#> 8 8
#> 9 9
#> 10 10
execute_adbc(
db,
"UPDATE some_table SET x = ? WHERE x >= ?",
bind = data.frame(123, 8)
)
read_adbc(db, "SELECT * from some_table") |>
tibble::as_tibble()
#> # A tibble: 10 × 1
#> x
#> <dbl>
#> 1 1
#> 2 2
#> 3 3
#> 4 4
#> 5 5
#> 6 6
#> 7 7
#> 8 123
#> 9 123
#> 10 123
```
<sup>Created on 2023-05-24 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] paleolimbot merged pull request #706: feat(r): Add `read_adbc()`, `write_adbc()`, and `execute_adbc()` convenience functions
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot merged PR #706:
URL: https://github.com/apache/arrow-adbc/pull/706
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org