Class: NoSE::Serialize::PlanStepRepresenter

Inherits:
Representable::Decorator
  • Object
show all
Includes:
Representable::Hash, Representable::JSON, Representable::Uncached, Representable::YAML
Defined in:
lib/nose/serialize.rb

Overview

Base representation for query plan steps

Instance Method Summary collapse

Methods included from Representable::Uncached

#representable_map

Instance Method Details

#cardinalityObject

The estimated cardinality at this step in the plan



247
248
249
250
# File 'lib/nose/serialize.rb', line 247

def cardinality
  state = represented.instance_variable_get(:@state)
  state.cardinality unless state.nil?
end

#hash_cardinalityFixnum

The estimated hash cardinality at this step in the plan

Returns:

  • (Fixnum)


255
256
257
258
# File 'lib/nose/serialize.rb', line 255

def hash_cardinality
  state = represented.instance_variable_get(:@state)
  state.hash_cardinality if state.is_a?(Plans::QueryState)
end