Class: PGExaminer::Result::Extension
- Inherits:
-
Item
- Object
- Base
- Item
- PGExaminer::Result::Extension
show all
- Defined in:
- lib/pg_examiner/result/extension.rb
Instance Attribute Summary
Attributes inherited from Item
#parent, #result, #row
Instance Method Summary
collapse
Methods inherited from Item
#inspect, #name, #oid
Methods inherited from Base
#==, #diff, #diffable_lists
Constructor Details
#initialize(*args) ⇒ Extension
Returns a new instance of Extension.
6
7
8
9
|
# File 'lib/pg_examiner/result/extension.rb', line 6
def initialize(*args)
super
@schema_calculated = false
end
|
Instance Method Details
#diffable_attrs ⇒ Object
11
12
13
14
15
16
|
# File 'lib/pg_examiner/result/extension.rb', line 11
def diffable_attrs
{
"name" => "name",
"extversion" => "extension version",
}
end
|
#diffable_methods ⇒ Object
18
19
20
21
22
|
# File 'lib/pg_examiner/result/extension.rb', line 18
def diffable_methods
{
"schema_name" => "schema name"
}
end
|
#schema ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/pg_examiner/result/extension.rb', line 24
def schema
if @schema_calculated
@schema
else
@schema_calculated = true
@schema = result.schemas.find{|s| s.oid == row['extnamespace']}
end
end
|
#schema_name ⇒ Object
36
37
38
|
# File 'lib/pg_examiner/result/extension.rb', line 36
def schema_name
schema && schema.name
end
|