Sequel Adapter #10

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

fl00r commented Feb 4, 2013

Hi, here is Sequel Adapter. But it doesn't work without patches into ruby-em-pg-client.

Owner

royaltm commented Feb 4, 2013

Great, nice hack!
I didn't look thoroughly yet, but couldn't we just add aliases with em_* to async_* instead of redefining default async_* api?
The em-synchrony/connection_pool and some other em-synchrony derived gems requires that methods returning deferrable object (async ones) begin with a* or async*.

On the other hand, the fiber-aware sync methods in em-synchrony/pg are without async* prefix.

Another approach would be to provide a patch in Sequel Adapter that adds required api aliases to PG::EM::Client.

fl00r commented Feb 4, 2013

Ok, I've patched Adapter with pretty dirty hack, so now it should work with current implementation of em-pg-client

@fl00r fl00r closed this Feb 4, 2013

fl00r commented Feb 5, 2013

Main problem is that PG API expects async_exec method as blocking (it should return Result), while in your client it returns Defferable.

Owner

royaltm commented Feb 5, 2013

Sure, but I cannot just change the API, since there is at least one gem depending on em-pg-client api as well. I'm going to look into that and for now your "dirty hack" seems pretty solving.

@royaltm royaltm reopened this Feb 5, 2013

@fl00r fl00r closed this Apr 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment