Class: PgGraph::Type::Schema
- Inherits:
-
Node
- Object
- HashTree::Set
- Node
- PgGraph::Type::Schema
show all
- Defined in:
- lib/pg_graph/type/type.rb,
lib/pg_graph/type/dump_type.rb
Instance Method Summary
collapse
Methods inherited from Node
#guid, #identifier, #inspect, #inspect_inner, #schema_identifier
Constructor Details
#initialize(database, name, **opts) ⇒ Schema
:call-seq: initialize(database, name, attach: true)
attach:false
is used when initializing the pg_catalog schema object
115
116
117
118
|
# File 'lib/pg_graph/type/type.rb', line 115
def initialize(database, name, **opts)
constrain database, Database
super(database, name, **opts)
end
|
Instance Method Details
#dump(link_info: false) ⇒ Object
13
14
15
|
# File 'lib/pg_graph/type/dump_type.rb', line 13
def dump(link_info: false)
super(record_types.sort_by(&:name), link_info: link_info)
end
|
#record_types ⇒ Object
110
|
# File 'lib/pg_graph/type/type.rb', line 110
def record_types() objects.select { |child| child.is_a?(RecordType) } end
|
#tables ⇒ Object
108
|
# File 'lib/pg_graph/type/type.rb', line 108
def tables() objects.select { |child| child.is_a?(Table) } end
|
#types ⇒ Object
109
|
# File 'lib/pg_graph/type/type.rb', line 109
def types() objects.select { |child| child.is_a?(Type) } end
|