If extra init_command options are given for the Django connector, load them #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the
init_command
option, which is used in other mysql connectors (and in the Django Database config setting).In the
_post_connection
method, it now calls the_execute_query
to run the given sql commands ininit_command
.Adding this option inside the Django database config now works, previously this was ignored.
I've added a test for the Django connector, but I had a hard time getting all tests for the other parts to work locally. Things "should be fine though (tm)", but that's probably not good enough :D Any pointers to where I should implement the unit tests are welcome.
Any comments or feedback in general is much appreciated.
I've filled out and signed the OCA.
I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.