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

Premade query object #228

Closed
wants to merge 3 commits into from
Closed

Conversation

grncdr
Copy link
Contributor

@grncdr grncdr commented Dec 10, 2012

Over on #227 Brian said:

If you need contributions on anything in particular I'd love to help you out.

This change would make it possible for any-db to remove the adapter layer for postgres and expose (patched) Client objects directly. The change is motivated by the way ConnectionPool.query works. The pool is able to return a QueryAdapter synchronously because connection.query accepts it as an optional parameter.

In this patch I've added support to the pure-js driver for separating initialization and construction in Query objects, which enables Client.query) to use a query_object from the config. If the general idea makes sense to you I'll try and do the same for the NativeQuery object.

@grncdr grncdr mentioned this pull request Dec 10, 2012
@grncdr
Copy link
Contributor Author

grncdr commented Dec 11, 2012

So I just noticed the #171 accomplishes the same goal, and is a much smaller change. I like the approach @troyk used more than this one, so if you don't mind terribly I'm going to redo this patch by rebasing his previous PR

@troyk
Copy link

troyk commented Dec 11, 2012

@grncdr if I recall, there was a test that needed to be rewritten not to use the same query object repeatedly and I just got busy with life and such

@brianc
Copy link
Owner

brianc commented Dec 11, 2012

yeah @troyk I'm working on getting those tests passing right now. Sorry for the very belated pull request merge. I too was busy w/ life & such. 😄 Merging in a few minutes.

@grncdr
Copy link
Contributor Author

grncdr commented Dec 11, 2012

I guess I'll wait before opening this next pull request then ;)

@brianc
Copy link
Owner

brianc commented Dec 11, 2012

taking longer than expected to merge. there's a bunch of hackery in the binary protocol support I'm undoing.

@grncdr
Copy link
Contributor Author

grncdr commented Dec 11, 2012

Closing this as #171 got merged and #229 adds the same functionality for the native bindings.

@grncdr grncdr closed this Dec 11, 2012
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