Class: Teradata::VarStringType

Inherits:
FieldType show all
Defined in:
lib/teradata/connection.rb

Overview

VARCHAR: variable-length character string VARBYTE: variable-length byte string

Instance Attribute Summary

Attributes inherited from FieldType

#format, #name, #title, #type_code, #type_name

Instance Method Summary collapse

Methods inherited from FieldType

code_names, codes, create, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Teradata::FieldType

Instance Method Details

#unmarshal(f) ⇒ Object



898
899
900
901
# File 'lib/teradata/connection.rb', line 898

def unmarshal(f)
  real_len = f.read(2).unpack('S').first
  @extractor.extract(f.read(real_len))
end