PgAction interface, fixing #6 #8

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@sopvop
Contributor
sopvop commented Nov 19, 2012

Implemented module as proposed by me in #6.

I'm not sure about module name though.

@ghost
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
Contributor
sopvop commented Nov 20, 2012

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

@mightybyte
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
Contributor
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
Contributor
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
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 mightybyte/postgresql-simple@ac280e7. I sent that as a pull request to postgresql-simple, but it hasn't been merged yet.

@sopvop
Contributor
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
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
Contributor
sopvop commented Nov 28, 2012

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

@sopvop
Contributor
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