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

refactor dplyr.frame() and lazy.frame() methods #2

Closed
3 tasks done
brownag opened this issue Apr 22, 2023 · 0 comments
Closed
3 tasks done

refactor dplyr.frame() and lazy.frame() methods #2

brownag opened this issue Apr 22, 2023 · 0 comments

Comments

@brownag
Copy link
Owner

brownag commented Apr 22, 2023

I would like to avoid the "lazy.frame" terminology, and also "dplyr.frame" is not useful shorthand for tbl(). I was toying with the ideas, which now work fine, and now would like to have an API more consistent with the rest of the package.

  • lazy.frame() will no longer be exported and will be renamed gpkg_table_pragma() -- this is useful information but not a substitute for table contents.
  • dplyr.frame() will no longer be exported, it will be renamed internally and will be used inside gpkg_table() and gpkg_tables() unless new argument pragma is TRUE.
  • gpkg_table() and gpkg_tables(): the new argument pragma=FALSE will require suggested package {dbplyr}, pragma=TRUE will use gpkg_table_pragma() instead of gpkg_table().
    • This is requiring the user to opt in to avoid the {dbplyr} dependencies rather than relying on what namespaces could be loaded to determine behavior (yuck)
    • gpkg_table() current behavior is to use dbGetQuery() to materialize full table in memory, which was not behavior of gpkg_tables(); "table" and "tables" will now be consistent and the old gpkg_table() code to make a table in memory will be available as gpkg_get_table() (or gpkg_collect_table() (?), or collect=TRUE argument to gpkg_table())

The lazy.frame/dplyr.frame functions will be removed from the namespace as I prepare for an initial release of gpkg v0.1.0.

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

No branches or pull requests

1 participant