Class: PgGraph::Type::Field

Inherits:
Node
  • Object
show all
Defined in:
lib/pg_graph/type/type.rb

Direct Known Subclasses

Column

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#dump, #guid, #inspect, #inspect_inner

Constructor Details

#initialize(composite_type, name, type) ⇒ Field

Returns a new instance of Field.



415
416
417
418
419
420
# File 'lib/pg_graph/type/type.rb', line 415

def initialize(composite_type, name, type)
  constrain composite_type, CompositeType, NilClass
  self.class < TableObject or !type.is_a?(TableObject) or raise "Illegal field type"
  super(composite_type, name)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



413
414
415
# File 'lib/pg_graph/type/type.rb', line 413

def type
  @type
end

Instance Method Details

#identifierObject



422
# File 'lib/pg_graph/type/type.rb', line 422

def identifier() name end

#schema_identifierObject



424
425
426
# File 'lib/pg_graph/type/type.rb', line 424

def schema_identifier
  composite_type.schema_identifier + '.' + identifier
end