class RailsBand::ActiveRecord::Event::Sql
A wrapper for the event that is passed to ‘sql.active_record`.
def async
def async return @async if defined? @async @async = @event.payload[:async] end
def binds
def binds @binds ||= @event.payload.fetch(:binds) end
def cached
def cached return @cached if defined? @cached @cached = @event.payload[:cached] end
def connection
def connection @connection ||= @event.payload.fetch(:connection) end
def sql
def sql @sql ||= @event.payload.fetch(:sql) end
def sql_name
- Note: - This method is renamed in order to avoid conflicts with BaseEvent#name.
def sql_name @sql_name ||= @event.payload.fetch(:name) end
def statement_name
def statement_name return @statement_name if defined? @statement_name @statement_name = @event.payload[:statement_name] end
def type_casted_binds
def type_casted_binds @type_casted_binds ||= @event.payload.fetch(:type_casted_binds) end