Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable autocomplete of column names in select.bcdc_promise and filter.bcdc_promise #113

Open
ateucher opened this issue Oct 10, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@ateucher
Copy link
Collaborator

No description provided.

@ateucher ateucher added the enhancement New feature or request label Oct 10, 2019
@boshek
Copy link
Collaborator

boshek commented Feb 12, 2020

I don't think is possible yet. If we take dbplyr as a comparable I think you have to have some part the table in memory first. Take this dbplyr example:

library(dplyr)
library(dbplyr)
con <- DBI::dbConnect(RSQLite::SQLite(), dbname = ":memory:")


copy_to(con, nycflights13::flights, "flights",
        temporary = FALSE, 
        indexes = list(
          c("year", "month", "day"), 
          "carrier", 
          "tailnum",
          "dest"
        )
)


## Auto-completes
flights_db %>% 
  select()

## Doesn't auto-complete
tbl(con, "flights") %>% 
  select()

Similarly with BC data:

library(bcdata)

air <- bcdc_get_data('bc-airports', resource = '4d0377d9-e8a1-429b-824f-0ce8f363512c')

## Auto-completes
air %>% 
  select()

## Doesn't auto-complete
bcdc_get_data('bc-airports', resource = '4d0377d9-e8a1-429b-824f-0ce8f363512c') %>% 
  select()

I would suggest that we make some modification to a vignette explicitly telling users how to take advantage of autocomplete then close the issue? Based on this the path allows for auto-completion should be our suggested workflow.

@ateucher
Copy link
Collaborator Author

for bcdc_query_geodata I think it might be possible if the object passed along is a zero-row df so the column names are available to the next function. I think we talked about that?

@boshek
Copy link
Collaborator

boshek commented Feb 12, 2020

🤦‍♂ Of course this needs to be bcdc_query_geodata. I do remember that now although I'm not totally sure how to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants