Class: Tablature::Adapters::Postgres::PartitionedTables Private
- Inherits:
-
Object
- Object
- Tablature::Adapters::Postgres::PartitionedTables
- Defined in:
- lib/tablature/adapters/postgres/partitioned_tables.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 the defined partitioned tables from the postgres connection.
Instance Method Summary collapse
-
#all ⇒ Array<Tablature::PartitionedTable>
private
All of the partitioned table that this connection has defined.
-
#initialize(connection) ⇒ PartitionedTables
constructor
private
A new instance of PartitionedTables.
Constructor Details
#initialize(connection) ⇒ PartitionedTables
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 PartitionedTables.
7 8 9 |
# File 'lib/tablature/adapters/postgres/partitioned_tables.rb', line 7 def initialize(connection) @connection = connection end |
Instance Method Details
#all ⇒ Array<Tablature::PartitionedTable>
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 partitioned table that this connection has defined.
14 15 16 |
# File 'lib/tablature/adapters/postgres/partitioned_tables.rb', line 14 def all partitions.group_by { |row| row['table_name'] }.map(&method(:to_tablature_table)) end |