Class: PG::TypeMapAllStrings

Inherits:
TypeMap
  • Object
show all
Defined in:
ext/pg_type_map_all_strings.c,
ext/pg_type_map_all_strings.c

Overview

This type map casts all values received from the database server to Strings and sends all values to the server after conversion to String by #to_s . That means, it is hard coded to PG::TextEncoder::String for value encoding and to PG::TextDecoder::String for text format respectively PG::BinaryDecoder::Bytea for binary format received from the server.

It is suitable for type casting query bind parameters, result values and COPY IN/OUT data.

This is the default type map for each PG::Connection .