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

Adding function to create new database #72

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tpmccallum
Copy link

I have added (by re-using some of the already existing code in the CreateDatabase.py file) a function which allows a new database to be created. I like the DB class and have therefore added a new function called createDatabase instead of writing new code elsewhere. The new function means that that a new database can be created (passing in new database name) instead of it being created through the existing function called "connect" which uses the self.dbname which was set in the constructor.
I deliberately did not change the existing functions or their signatures (arguments) to avoid side effects but rather created a new function "createDatabase" and added the existing "query" function from the BookwormSQLDatabase class (which already existed in the CreateDatabase.py file below my new changes).

I have tested this code on a fresh installation and it works great.

Overall just a little bit of extra functionality. I hope to do a lot more with Bookworm (write Python code to harvest OAI-PMH from various places) and would much prefer to stay with your code than fork and head in another direction missing out on your future development.

Kind regards
Tim

@tpmccallum
Copy link
Author

Please don't hesitate to ask any questions, really appreciate the product guys.
Tim

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

Successfully merging this pull request may close these issues.

None yet

1 participant