Class: Fx::Adapters::MySQL::Triggers Private

Inherits:
Object
  • Object
show all
Defined in:
lib/fx/adapters/mysql/triggers.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Fetches defined triggers from the mysql connection.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Triggers

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Triggers.



14
15
16
# File 'lib/fx/adapters/mysql/triggers.rb', line 14

def initialize(connection)
  @connection = connection
end

Class Method Details

.all(*args) ⇒ Array<Fx::Adapters::MySQL::Trigger>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Wraps #all as a static facade.

Returns:

  • (Array<Fx::Adapters::MySQL::Trigger>)


10
11
12
# File 'lib/fx/adapters/mysql/triggers.rb', line 10

def self.all(*args)
  new(*args).all
end

Instance Method Details

#allArray<Fx::Trigger>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

All of the triggers that this connection has defined.

Returns:

  • (Array<Fx::Trigger>)


21
22
23
# File 'lib/fx/adapters/mysql/triggers.rb', line 21

def all
  triggers_from_mysql.map { |trigger| to_fx_trigger(trigger) }
end