class Mysql::Partitioner::Partition::Range
Attributes
less_than[RW]
name[RW]
Public Class Methods
new(less_than, name=nil)
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 7 def initialize(less_than, name=nil) self.less_than = less_than == "MAXVALUE" ? Float::MAX : less_than.to_i if name == nil then name = self.build_name end self.name = name end
Public Instance Methods
==(other)
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 31 def ==(other) other.instance_of?(self.class) && other.name == self.name end
bounded?()
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 15 def bounded? self.less_than < Float::MAX end
build_name()
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 19 def build_name() "p" + self.less_than.to_s end
eql?(other)
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 27 def eql?(other) self == other end
hash()
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 35 def hash self.name.hash end
to_partition_def()
click to toggle source
# File lib/mysql/partitioner/partition/range.rb, line 23 def to_partition_def "PARTITION #{self.name} VALUES LESS THAN (#{self.less_than})" end