Class: PgPartitions::SQL::Trigger
- Inherits:
-
Struct
- Object
- Struct
- PgPartitions::SQL::Trigger
- Defined in:
- lib/pg_partitions/sql.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
Returns the value of attribute event.
-
#name ⇒ Object
Returns the value of attribute name.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event
72 73 74 |
# File 'lib/pg_partitions/sql.rb', line 72 def event @event end |
#name ⇒ Object
Returns the value of attribute name
72 73 74 |
# File 'lib/pg_partitions/sql.rb', line 72 def name @name end |
#table ⇒ Object
Returns the value of attribute table
72 73 74 |
# File 'lib/pg_partitions/sql.rb', line 72 def table @table end |
Instance Method Details
#to_sql ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/pg_partitions/sql.rb', line 73 def to_sql " CREATE TRIGGER \#{name}\n \#{event} ON \#{table}\n FOR EACH ROW EXECUTE PROCEDURE \#{name}();\n SQL\nend\n" |