class SqlPostgres::PgType

This is the base class for the classes that represent column types.

Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source

Return true if other is is equal to this object.

# File lib/sqlpostgres/PgType.rb, line 9
def eql?(other)
  other.is_a?(self.class) && parts == other.parts
end
Also aliased as: ==
hash() click to toggle source

Return the hash code.

# File lib/sqlpostgres/PgType.rb, line 16
def hash
  parts.to_s.hash
end
to_sql() click to toggle source

Return the SQL representation.

# File lib/sqlpostgres/PgType.rb, line 22
def to_sql
  "#{column_type} '#{to_s}'"
end