Expose PQSendQueryParams and handle bytea data type #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description of our use case: We're currently using the
pggem with a lot of either hand crafted or generated queries with the postgresql style arguments. This means code like this:This format is not compatible with the db style placeholders. Instead of having to migrate big bang style, this change exposes
PQSendQueryParamswhich can handle this format. This allows us to change the backend from pg to db-postgres and then we can slowly migrate to the db style placeholders.This change also adds support for the bytea data type (this is kind of connected to the arguments), this might be a backwards incompatible change, where the old code returned a hexdump of the bytea string, which is now returned as a Ruby string with binary encoding.
Types of Changes
Contribution