Class: PG::TextEncoder::Bytea
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
PG::SimpleEncoder
|
Defined in: | ext/pg_text_encoder.c |
Overview
This is an encoder class for the PostgreSQL bytea
type.
The binary String
is converted to hexadecimal representation for transmission in text format. For query bind parameters it is recommended to use PG::BinaryEncoder::Bytea
or the hash form {value: binary_string, format: 1}
instead, in order to decrease network traffic and CPU usage. See Connection#exec_params for using the hash form.
This encoder is particular useful when CopyRow
is used with the COPY command. In this case there’s no way to change the format of a single column to binary, so that the data have to be converted to bytea hex representation.
Constant Summary
::PG::Coder
- Inherited
FORMAT_ERROR_MASK, FORMAT_ERROR_TO_PARTIAL, FORMAT_ERROR_TO_RAISE, FORMAT_ERROR_TO_STRING, TIMESTAMP_APP_LOCAL, TIMESTAMP_APP_UTC, TIMESTAMP_DB_LOCAL, TIMESTAMP_DB_UTC
Class Method Summary
::PG::Coder
- Inherited
.new | Create a new coder object based on the attribute Hash. |
Instance Attribute Summary
::PG::Coder
- Inherited
#flags | Get current bitwise OR-ed coder flags. |
#flags= | Set coder specific bitwise OR-ed flags. |
#format | The format code that is sent alongside with an encoded query parameter value. |
#format= | Specifies the format code that is sent alongside with an encoded query parameter value. |
#name | Name of the coder or the corresponding data type. |
#oid | The type OID that is sent alongside with an encoded query parameter value. |
#oid= | Specifies the type OID that is sent alongside with an encoded query parameter value. |
Instance Method Summary
::PG::Coder
- Inherited
#==, #dup, #inspect, #inspect_short, #marshal_dump, #marshal_load, | |
#to_h | Returns coder attributes as Hash. |
Constructor Details
This class inherits a constructor from PG::Coder