This repository has been archived by the owner on Jun 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 324
Return a new instance of Driver from registry's GetDriver() function #195
Open
bradley219
wants to merge
19
commits into
mattes:master
Choose a base branch
from
bradley219:registry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eck-schema Postgres: version table existence check in current schema
Avoid getting caught by go vet for using "\n" with Println main.go:187: Println call ends with newline
Fix for go vet
Golint. Rewrite cassandra driver
Call Close() in Version()
…kes a pointer receiver
driver/sqlite3: Fix for upstream changes
Seems the sqlite3 packaged reverted to using non-pointer Error. This patch corrects the use of it here.
fixing error cast for sqlite3
According to the PostgreSQL documentation (section 32.1.1.2), postgres library supports two URI schemes: postgresql:// and postgres:// Reference: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
Support for alternative postgres URI scheme
Not sure off the top of my head how to deal with the test failures involving RegisterMethodsReceiverForDriver()—this came as a surprise just now. If you have any ideas please let me know :) |
Sorry for the delay. Was out for conferences last week in SF. I fixed this in v3. Would you mind checking that version out and see if it suits your use-case? |
Would you mind changing the target branch to v1 ? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I've found that concurrent migrations on multiple schema are not possible due to the fact that GetDriver() returns a Driver singleton for all named drivers. There are definitely more sound ways to solve this (i.e. registering a factory method to create a customized new instance of Driver), but given the simplicity of the current design, I've opted to just create and return a new instance of Driver from GetDriver() by using the reflect package.
I've tested this using the MySQL driver specifically and am now able to run concurrent migrations on any number of unique database URLs.