Module: Groovy::Types

Defined in:
lib/groovy/types.rb

Constant Summary collapse

MAPPINGS =

BIGRAM BOOL BOOLEAN DELIMIT FLOAT INT16 INT32 INT64 INT8 LONG_TEXT MECAB OBJECT SHORT_TEXT TEXT TIME TRIGRAM UINT16 UINT32 UINT64 UINT8 UNIGRAM

{
  'String' => 'short_text', # max 4095 bytes
  'Text' => 'text',         # max 65,535 bytes
  'Float' => 'float',
  'Bool' => 'boolean',
  'Boolean' => 'boolean',
  'Integer' => 'int32',
  'BigDecimal' => 'int64',
  'Time' => 'time'
}

Class Method Summary collapse

Class Method Details

.map(type) ⇒ Object



38
39
40
# File 'lib/groovy/types.rb', line 38

def self.map(type)
  MAPPINGS[type.to_s] or raise "Invalid type: #{type}"
end