Sha256: 1d06f38904485b5b04e431c94d92c8931437a98e9be9c0d7f36a133ae9a66c33

Contents?: true

Size: 484 Bytes

Versions: 4

Compression:

Stored size: 484 Bytes

Contents

module Valle
  module AbstractAdapter
    class ByteLimitedColumn < AbstractColumn

      def maximum
        case limit
        when 1; 127
        when 2; 32767
        when 3; 8388607
        when 4; 2147483647
        when 8; 9223372036854775807
        end
      end

      def minimum
        case limit
        when 1; -128
        when 2; -32768
        when 3; -8388608
        when 4; -2147483648
        when 8; -9223372036854775808
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
valle-0.2.0 lib/valle/abstract_adapter/byte_limited_column.rb
valle-0.1.0 lib/valle/abstract_adapter/byte_limited_column.rb
valle-0.0.3 lib/valle/abstract_adapter/byte_limited_column.rb
valle-0.0.2 lib/valle/abstract_adapter/byte_limited_column.rb