Class: PgDice::PartitionLister

Inherits:
Object
  • Object
show all
Defined in:
lib/pgdice/partition_lister.rb

Overview

PartitionLister is used to list partitions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query_executor:) ⇒ PartitionLister

Returns a new instance of PartitionLister.



9
10
11
# File 'lib/pgdice/partition_lister.rb', line 9

def initialize(query_executor:)
  @query_executor = query_executor
end

Instance Attribute Details

#query_executorObject (readonly)

Returns the value of attribute query_executor.



7
8
9
# File 'lib/pgdice/partition_lister.rb', line 7

def query_executor
  @query_executor
end

Instance Method Details

#call(all_params) ⇒ Object



13
14
15
16
# File 'lib/pgdice/partition_lister.rb', line 13

def call(all_params)
  sql = build_partition_table_fetch_sql(all_params)
  query_executor.call(sql)
end