Class: Scenic::Adapters::Mysql::Indexes Private

Inherits:
Object
  • Object
show all
Defined in:
lib/scenic/adapters/mysql/indexes.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 indexes on objects from the Mysql connection.

Instance Method Summary collapse

Constructor Details

#initialize(connection:) ⇒ Indexes

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 Indexes.



8
9
10
# File 'lib/scenic/adapters/mysql/indexes.rb', line 8

def initialize(connection:)
  @connection = connection
end

Instance Method Details

#on(name) ⇒ Array<Scenic::Index>

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.

Indexes on the provided object.

Parameters:

  • name (String)

    The name of the object we want indexes from.

Returns:

  • (Array<Scenic::Index>)


16
17
18
# File 'lib/scenic/adapters/mysql/indexes.rb', line 16

def on(name)
  indexes_on(name).map.(&method(:index_from_database))
end