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

Add help function for dropping a table #347

Closed
carlhiggs opened this issue Jul 21, 2023 · 0 comments
Closed

Add help function for dropping a table #347

carlhiggs opened this issue Jul 21, 2023 · 0 comments

Comments

@carlhiggs
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
There is currently a drop() function within the ghsci.Region object, but this drops a database. Sometime you just want to drop a table.

Describe the solution you'd like
If a user supplies no argument, proceed to attempt to drop database if the user confirms they wish to do this.

However, if a word is supplied, then that should be assumed to be a table and an attempt made to drop this.

Additional context
This will be useful for developing / testing new functionality, but also for advanced users who use the region object subfunctions as convenient helps for loading their own data to a region's spatial database. If they do that, there should also be the easy option to get rid of it. We don't need a new function to do this, just introduce polymorphism into the existing one.

carlhiggs added a commit that referenced this issue Jul 24, 2023
…346) by creating a raster_to_db function that is now used when importing raster population grids. Also added function to drop a single table (#347), and addressed a potential division by zero error for study regions with population < 10000 (#349)
@carlhiggs carlhiggs mentioned this issue Jul 24, 2023
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