Class: PgGraph::Type::TableType

Inherits:
ArrayType show all
Includes:
TableObject
Defined in:
lib/pg_graph/type/type.rb

Overview

Note that the name of a TableType object is the record name in brackets while the name of a Table object is the pluralized record name

Constant Summary

Constants inherited from ArrayType

ArrayType::DEFAULT_MAX_DIMENSIONS

Instance Attribute Summary

Attributes inherited from ArrayType

#dimensions, #element_type

Instance Method Summary collapse

Methods included from TableObject

#table, #table_type

Methods inherited from ArrayType

#array?, #rank

Methods inherited from Type

#array?, #rank, #tuple?, #value?

Methods inherited from Node

#dump, #guid, #inspect, #inspect_inner

Constructor Details

#initialize(schema, record_type) ⇒ TableType

Returns a new instance of TableType.



396
397
398
399
# File 'lib/pg_graph/type/type.rb', line 396

def initialize(schema, record_type)
  constrain record_type, RecordType
  super(schema, nil, record_type)
end

Instance Method Details

#array_typeObject

Raises:



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

def array_type() raise Error, "Array of TableType is not allowed" end

#identifierObject



401
402
403
# File 'lib/pg_graph/type/type.rb', line 401

def identifier
  "{#{element_type.identifier}}"
end

#schema_identifierObject



405
406
407
# File 'lib/pg_graph/type/type.rb', line 405

def schema_identifier
  "{#{element_type.schema_identifier}}"
end