提交 00e192ef 编写于 作者: A Aaron Patterson

use the class method to (un)escape binary values

上级 66fc1d6a
......@@ -455,14 +455,14 @@ def table_alias_length
# Escapes binary strings for bytea input to the database.
def escape_bytea(value)
@connection.escape_bytea(value) if value
PGconn.escape_bytea(value) if value
end
# Unescapes bytea output from a database to the binary string it represents.
# NOTE: This is NOT an inverse of escape_bytea! This is only to be used
# on escaped binary output from database drive.
def unescape_bytea(value)
@connection.unescape_bytea(value) if value
PGconn.unescape_bytea(value) if value
end
# Quotes PostgreSQL-specific data types for SQL input.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册