Class: PGExaminer::Result::Trigger

Inherits:
Item
  • Object
show all
Defined in:
lib/pg_examiner/result/trigger.rb

Instance Attribute Summary

Attributes inherited from Item

#parent, #result, #row

Instance Method Summary collapse

Methods inherited from Item

#initialize, #inspect, #name, #oid

Methods inherited from Base

#==, #diff, #diffable_lists

Constructor Details

This class inherits a constructor from PGExaminer::Result::Item

Instance Method Details

#diffable_attrsObject



6
7
8
9
10
11
# File 'lib/pg_examiner/result/trigger.rb', line 6

def diffable_attrs
  {
    "name"   => "name",
    "tgtype" => "trigger firing conditions (tgtype)",
  }
end

#diffable_methodsObject



13
14
15
16
17
# File 'lib/pg_examiner/result/trigger.rb', line 13

def diffable_methods
  {
    "function" => "function"
  }
end

#functionObject



19
20
21
# File 'lib/pg_examiner/result/trigger.rb', line 19

def function
  @function ||= result.pg_proc.find{|f| f['oid'] == @row['tgfoid']}['name']
end