Sha256: c5872228a69460e82da358ffac17e3575d2ffdaa5f9275cc7554341ddab1fc6e

Contents?: true

Size: 692 Bytes

Versions: 31

Compression:

Stored size: 692 Bytes

Contents

module Groovy

  module Types

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

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

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

  end

end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
groovy-0.7.1 lib/groovy/types.rb
groovy-0.7.0 lib/groovy/types.rb
groovy-0.6.8 lib/groovy/types.rb
groovy-0.6.7 lib/groovy/types.rb
groovy-0.6.6 lib/groovy/types.rb
groovy-0.6.4 lib/groovy/types.rb
groovy-0.6.1 lib/groovy/types.rb
groovy-0.6.0 lib/groovy/types.rb
groovy-0.5.1 lib/groovy/types.rb
groovy-0.5.0 lib/groovy/types.rb
groovy-0.4.7 lib/groovy/types.rb
groovy-0.4.6 lib/groovy/types.rb
groovy-0.4.5 lib/groovy/types.rb
groovy-0.4.4 lib/groovy/types.rb
groovy-0.4.3 lib/groovy/types.rb
groovy-0.4.2 lib/groovy/types.rb
groovy-0.4.1 lib/groovy/types.rb
groovy-0.4.0 lib/groovy/types.rb
groovy-0.3.0 lib/groovy/types.rb
groovy-0.2.9 lib/groovy/types.rb