Class: Tablature::Adapters::Postgres::PartitionedTables Private

Inherits:
Object
  • Object
show all
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

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

#allArray<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.

Returns:



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