Skip to content
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.

Add support for Cassandra >= 3 with protocol version 4 #89

Merged
merged 1 commit into from
Mar 21, 2016
Merged

Add support for Cassandra >= 3 with protocol version 4 #89

merged 1 commit into from
Mar 21, 2016

Conversation

arbarlow
Copy link
Contributor

I added this as a url query as I'm not sure of the backwards compatibility with previous version of the protocol, but I'm open to ideas

I'm also open to suggestions of testing, since the docker image isn't Cassandra 3, but I have testing with my cluster and it seems to work...

@@ -52,6 +53,11 @@ func (driver *Driver) Initialize(rawurl string) error {
cluster.Consistency = gocql.All
cluster.Timeout = 1 * time.Minute

if u.Query().Get("protocol") != "" {
protoversion, _ := strconv.Atoi(u.Query().Get("protocol"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's check the err and return if not nil

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only set cluster.ProtoVersion if len(u.Query().Get("protocol")) > 0

@mattes
Copy link
Owner

mattes commented Mar 21, 2016

thanks for your work!

@arbarlow
Copy link
Contributor Author

No worries, fixes made!

mattes added a commit that referenced this pull request Mar 21, 2016
Add support for Cassandra >= 3 with protocol version 4
@mattes mattes merged commit ce1b59b into mattes:master Mar 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants