Suggestion: PG::Connection#complile#726
Conversation
2cd9444 to
b0a2666
Compare
b0a2666 to
6b746e9
Compare
|
That sounds like a great idea! It's because I manually inserted too many parameters into too many queries from rails debug log in order to execute it in |
.. to replace code specific to the classes derived from PG::TypeMap. Also: - Deny binary format in SQL text - Make BinaryString working
|
I added a commit to use generic PG::TypeMap methods only and regarding binary data and binary format. The method name "compile" is not very specific. Is it used in any other database driver? How sounds |
|
@larskanis thank you. |
I don't have any strong preferences regarding this. |
Introduce
PG::Connection#complilethat take sql string and position parameters and compiles it into a plain sql. I couldn't find another way how to do it using built-in tools. The motivation behind this implementation:The downside of this implementation is that it can't reliably encode binary data into a string representation except some common cases like with booleans, but do we need them at all?