Class: PG::TextDecoder::Array

Inherits:
CompositeDecoder show all
Defined in:
ext/pg_text_decoder.c

Overview

This is a decoder class for PostgreSQL array types.

It returns an Array with possibly an arbitrary number of sub-Arrays. All values are decoded according to the #elements_type accessor. Sub-arrays are decoded recursively.

This decoder simply ignores any dimension decorations preceding the array values. It returns all array values as regular ruby Array with a zero based index, regardless of the index given in the dimension decoration.

An array decoder which respects dimension decorations is waiting to be implemented.

Constant Summary

Constants inherited from Coder

Coder::FORMAT_ERROR_MASK, Coder::FORMAT_ERROR_TO_PARTIAL, Coder::FORMAT_ERROR_TO_RAISE, Coder::FORMAT_ERROR_TO_STRING, Coder::TIMESTAMP_APP_LOCAL, Coder::TIMESTAMP_APP_UTC, Coder::TIMESTAMP_DB_LOCAL, Coder::TIMESTAMP_DB_UTC

Instance Attribute Summary

Attributes inherited from CompositeCoder

#elements_type

Attributes inherited from Coder

#name

Method Summary

Methods inherited from CompositeCoder

#delimiter, #delimiter=, #elements_type=, #inspect, #needs_quotation=, #needs_quotation?, #to_h

Methods inherited from Coder

#==, #dup, #flags, #flags=, #format, #format=, #initialize, #inspect, #inspect_short, #marshal_dump, #marshal_load, #oid, #oid=, #to_h

Constructor Details

This class inherits a constructor from PG::Coder