Class: Momomoto::Datatype::Array
- Inherits:
-
Object
- Object
- Momomoto::Datatype::Array
- Defined in:
- lib/momomoto/datatype/array.rb,
lib/momomoto/datatype/array/base.rb,
lib/momomoto/datatype/array/text.rb,
lib/momomoto/datatype/array/integer.rb
Overview
Represents the data type Array.
Defined Under Namespace
Constant Summary collapse
- Int4 =
Integer
Class Method Summary collapse
-
.new(row = nil) ⇒ Object
Creates a new instance of the special data type, setting
not_null
anddefault
according to the values from Information Schema.
Class Method Details
.new(row = nil) ⇒ Object
Creates a new instance of the special data type, setting not_null
and default
according to the values from Information Schema.
14 15 16 17 18 19 20 21 |
# File 'lib/momomoto/datatype/array.rb', line 14 def self.new( row = nil ) subtype = nil if row.respond_to?( :udt_name ) && row.udt_name subtype = row.udt_name.gsub(/^_/,"") end subtype ||= 'text' Momomoto::Datatype::Array.const_get(subtype.capitalize).new( row ) end |