Skip to content

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

Description

@ateucher
No description provided.

Activity

  1. boshek commented on Feb 12, 2020

    @boshek
    Collaborator

    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.

  2. ateucher commented on Feb 12, 2020

    @ateucher
    CollaboratorAuthor

    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?

  3. boshek commented on Feb 12, 2020

    @boshek
    Collaborator

    🤦‍♂ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions