class Cql::Client::ColumnMetadata

Represents metadata about a column in a query result set or prepared statement. Apart from the keyspace, table and column names there’s also the type as a symbol (e.g. ‘:varchar`, `:int`, `:date`).

Attributes

column_name[R]
keyspace[R]
table[R]
type[R]

Public Class Methods

new(*args) click to toggle source

@private

# File lib/cql/client/column_metadata.rb, line 12
def initialize(*args)
  @keyspace, @table, @column_name, @type = args
end

Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source
# File lib/cql/client/column_metadata.rb, line 21
def eql?(other)
  self.keyspace == other.keyspace && self.table == other.table && self.column_name == other.column_name && self.type == other.type
end
Also aliased as: ==
hash() click to toggle source
# File lib/cql/client/column_metadata.rb, line 26
def hash
  @h ||= begin
    h = 0
    h = ((h & 33554431) * 31) ^ @keyspace.hash
    h = ((h & 33554431) * 31) ^ @table.hash
    h = ((h & 33554431) * 31) ^ @column_name.hash
    h = ((h & 33554431) * 31) ^ @type.hash
    h
  end
end
to_ary() click to toggle source

@private

# File lib/cql/client/column_metadata.rb, line 17
def to_ary
  [@keyspace, @table, @column_name, @type]
end