module Sequel::Plugins::UpdateRefresh::InstanceMethods

Public Instance Methods

after_update() click to toggle source
Calls superclass method
# File lib/sequel/plugins/update_refresh.rb, line 24
def after_update
  super
  unless this.supports_returning?(:update)
    refresh
  end
end

Private Instance Methods

_update_without_checking(columns) click to toggle source
Calls superclass method
# File lib/sequel/plugins/update_refresh.rb, line 33
def _update_without_checking(columns)
  ds = _update_dataset
  if ds.supports_returning?(:update)
    ds = ds.opts[:returning] ? ds : ds.returning
    rows = ds.update(columns)
    n = rows.length
    if n == 1
      @values.merge!(rows.first)
    end
    n
  else
    super
  end
end