Class: Scenic::Adapters::Mysql::Views Private
- Inherits:
-
Object
- Object
- Scenic::Adapters::Mysql::Views
- Defined in:
- lib/scenic/adapters/mysql/views.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 views from the mysql connection.
Instance Method Summary collapse
-
#all ⇒ Array<Scenic::View>
private
All of the views that this connection has defined.
-
#initialize(connection) ⇒ Views
constructor
private
A new instance of Views.
Constructor Details
#initialize(connection) ⇒ Views
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 Views.
7 8 9 |
# File 'lib/scenic/adapters/mysql/views.rb', line 7 def initialize(connection) @connection = connection end |
Instance Method Details
#all ⇒ Array<Scenic::View>
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 views that this connection has defined. Mysql will return these views ordered by name. Difference from the original Postgres adapter:
Mysql2 gem only watches one schema at a time.
This will not include materialized views as these are not supported by mysql.
20 21 22 |
# File 'lib/scenic/adapters/mysql/views.rb', line 20 def all views_from_mysql.map(&method(:to_scenic_view)) end |