Navigation Menu

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

PgAction interface, fixing #6 #8

Closed
wants to merge 2 commits into from
Closed

PgAction interface, fixing #6 #8

wants to merge 2 commits into from

Conversation

sopvop
Copy link
Contributor

@sopvop sopvop commented Nov 19, 2012

Implemented module as proposed by me in #6.

I'm not sure about module name though.

@ghost
Copy link

ghost commented Nov 20, 2012

Could query, execute, etc be exported doing the withPostgres already, like the original API does? Is there any downside to that?

@sopvop
Copy link
Contributor Author

sopvop commented Nov 20, 2012

The original api is still there, so if you don't use transactions, you can still use it.

@mightybyte
Copy link
Owner

@sopvop This looks pretty nice. It makes me think maybe we should just switch wholesale and not worry about backwards compatibility. What do you think?

@sopvop
Copy link
Contributor Author

sopvop commented Nov 22, 2012

@mightybyte It may be too big change for many users, but I wont mind it myself. And transaction functions should be removed from old api anyway.

I think we should wait a few days for other opinions on this. Maybe someone will come up with even better solution.

@sopvop
Copy link
Contributor Author

sopvop commented Nov 26, 2012

So, no new ideas, lets break things!
Since @amontague, and possibly others, want old functionality, we should keep it.
Should I make prefixed/suffixed functions with embedded 'withPostgres'? What would be good suffix/prefix for it?
Or put "old" interface into other module, for compatibility? I can't make up a good name for such module, 'Simple' would be good name, but PostgresqlSimple.Simple does not sound nice.
Of course all transaction functions should be removed.

@mightybyte
Copy link
Owner

I found some time to work on this yesterday. My current thought is to see if I can merge this idea with what I did here https://github.com/mightybyte/postgresql-simple/commit/ac280e714f57589b23e23c948c0f949199307b95. I sent that as a pull request to postgresql-simple, but it hasn't been merged yet.

@sopvop
Copy link
Contributor Author

sopvop commented Nov 27, 2012

@lpsmith complained about lack of time few months ago, there are a lot of stuff in 0.3 branch of postgresql-simple waiting for cleanup and release.

@lpsmith
Copy link
Contributor

lpsmith commented Nov 27, 2012

Well, at this point I mostly want to get what I want done in terms of overhauling the typeinfo stuff and push it out the door. But yes, if somebody wants to play around with the 0.3 branch, I'm definitely interested in hearing feedback.

You never sent me a proper pull request, mightybyte; at this point I'm inclined to adopt your suggestion as soon as we can find an acceptable MonadCatchIO alternative and generalize things a bit more appropriately. I've found that, for example, the (... -> IO ...) -> m ... shortcut on e.g. fold just really isn't so terribly useful.

Though what if you removed those functions from your wrapper?

@sopvop
Copy link
Contributor Author

sopvop commented Nov 28, 2012

@lpsmith how about monad-control? snap is switching to it from MonadCatchIO

@sopvop
Copy link
Contributor Author

sopvop commented May 14, 2015

Should have been closed long ago

@sopvop sopvop closed this May 14, 2015
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.

None yet

3 participants