Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

[WIP] Support for go1.8 #172

Merged
merged 3 commits into from
May 14, 2017
Merged

[WIP] Support for go1.8 #172

merged 3 commits into from
May 14, 2017

Conversation

gernest
Copy link
Collaborator

@gernest gernest commented May 9, 2017

This will eventually close #141`

@cznic
Copy link
Owner

cznic commented May 10, 2017

I think the 'WIP' suggests to do the code review only once the PR is complete, right?

@cznic cznic self-requested a review May 10, 2017 13:12
@gernest
Copy link
Collaborator Author

gernest commented May 10, 2017

@cznic not really, mostly each commit is independent, and you can review as new commits comes in. Only merging has to wait until it is complete.

It will be really helpful to me if we review as I add new features so that by the end I wont have duplicate efforts for the case when I make bad choices.

For Instance, your feedback on the commits which add NamedArg support, can help clear that feature. I intend to work on adding support for canceling queries, which will probably cover the rest of go1.8 features.

@cznic
Copy link
Owner

cznic commented May 10, 2017

Okay, thanks for letting me know. The plan is to clear the codereview queue this evening.

Copy link
Owner

@cznic cznic left a comment

Choose a reason for hiding this comment

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

LGTM for 94b9de5

Copy link
Owner

@cznic cznic left a comment

Choose a reason for hiding this comment

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

One small change please in e1046c1

driver1.8.go Outdated
@@ -0,0 +1,74 @@
//+build go1.8
Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Owner

@cznic cznic left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

@gernest
Copy link
Collaborator Author

gernest commented May 11, 2017

Thanks. I will now see how I can introduce context.Context and enforce canceling of running queries.

@cznic
Copy link
Owner

cznic commented May 11, 2017

I will now see how I can introduce context.Context and enforce canceling of running queries.

The row retrieving closure has to return more == false to stop the query:

ql/ql.go

Line 225 in eb22df2

// If f returns more == false or err != nil then f will not be called for any

@gernest
Copy link
Collaborator Author

gernest commented May 11, 2017

@cznic neat trick

[OFFTOPIC] effectively testing the query cancelation I have to slow down queries, in postgres they use pg_sleep.

I already laid out the groundwork for supporting something like pg_sleep just wondering what will be a better name for the function sleep or ql_sleep?

I will submit a separate PR for the function

@gernest
Copy link
Collaborator Author

gernest commented May 14, 2017

@cznic Can we just merge these changes?

I have hit a wall trying to make queries cancelable. When we come up with a way to halt execution maybe someone can pick it up from there.

@cznic
Copy link
Owner

cznic commented May 14, 2017

Can we just merge these changes?

Yes.

@gernest gernest merged commit a41c706 into cznic:master May 14, 2017
@gernest gernest deleted the go1.8 branch May 14, 2017 11:22
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.

go1.8: support for additional features
2 participants