class PgPartitions::SQL::DeleteFunction

Public Class Methods

new(table, name) click to toggle source
Calls superclass method
# File lib/pg_partitions/sql.rb, line 61
def initialize(table, name)
  super(table, name, delete_statement(table))
end

Private Instance Methods

delete_statement(table) click to toggle source
# File lib/pg_partitions/sql.rb, line 67
def delete_statement(table)
  "DELETE FROM ONLY #{table} WHERE id = NEW.id RETURNING * INTO result;"
end