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 Postgres provider #1

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

Add Postgres provider #1

wants to merge 8 commits into from

Conversation

lonnc
Copy link

@lonnc lonnc commented Apr 13, 2017

This pull request contains a provider for Postgres.

As sqlstore currently includes references to "github.com/go-sql-driver/mysql", I've pulled the MySql specific code out into separate package. Unfortunately this does mean the CreateMySQL func has moved and so is a breaking change.

Fixed fetch when version = 0 is requested.

lonnc added 8 commits April 13, 2017 20:07
So mysql driver isn't required by other sql providers
and other providers can test their eventsource.Store implementation
Remove setting version to MaxInt32 as this causes huge slice allocation to history

Don't pass in version parameter when fetching version 0
From docs: "The returned DB is safe for concurrent use by multiple goroutines and maintains its own pool of idle connections. Thus, the Open function should be called just once. It is rarely necessary to close a DB."
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.

1 participant