Module: PgDice
- Extended by:
- Forwardable
- Defined in:
- lib/pgdice.rb,
lib/pgdice/error.rb,
lib/pgdice/table.rb,
lib/pgdice/version.rb,
lib/pgdice/log_helper.rb,
lib/pgdice/validation.rb,
lib/pgdice/date_helper.rb,
lib/pgdice/table_finder.rb,
lib/pgdice/configuration.rb,
lib/pgdice/period_fetcher.rb,
lib/pgdice/query_executor.rb,
lib/pgdice/approved_tables.rb,
lib/pgdice/partition_helper.rb,
lib/pgdice/partition_lister.rb,
lib/pgdice/pg_slice_manager.rb,
lib/pgdice/partition_dropper.rb,
lib/pgdice/partition_manager.rb,
lib/pgdice/validation_factory.rb,
lib/pgdice/database_connection.rb,
lib/pgdice/period_fetcher_factory.rb,
lib/pgdice/query_executor_factory.rb,
lib/pgdice/partition_helper_factory.rb,
lib/pgdice/partition_lister_factory.rb,
lib/pgdice/pg_slice_manager_factory.rb,
lib/pgdice/configuration_file_loader.rb,
lib/pgdice/partition_dropper_factory.rb,
lib/pgdice/partition_manager_factory.rb,
lib/pgdice/database_connection_factory.rb
Overview
Defined Under Namespace
Modules: DateHelper, LogHelper, TableFinder
Classes: ApprovedTables, Configuration, ConfigurationError, ConfigurationFileLoader, DatabaseConnection, DatabaseConnectionFactory, Error, IllegalTableError, InsufficientFutureTablesError, InsufficientPastTablesError, InsufficientTablesError, InvalidConfigurationError, MissingConfigurationFileError, NotConfiguredError, PartitionDropper, PartitionDropperFactory, PartitionHelper, PartitionHelperFactory, PartitionLister, PartitionListerFactory, PartitionManager, PartitionManagerFactory, PeriodFetcher, PeriodFetcherFactory, PgResponse, PgSliceError, PgSliceManager, PgSliceManagerFactory, QueryExecutor, QueryExecutorFactory, Table, TableNotPartitionedError, Validation, ValidationError, ValidationFactory
Constant Summary
collapse
- SUPPORTED_PERIODS =
{ 'day' => 'YYYYMMDD', 'month' => 'YYYYMM', 'year' => 'YYYY' }.freeze
- VERSION =
'2.0.0'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
6
7
8
|
# File 'lib/pgdice/configuration.rb', line 6
def configuration
@configuration
end
|
Class Method Details
8
9
10
11
12
|
# File 'lib/pgdice/configuration.rb', line 8
def configure(validate_configuration: true)
self.configuration ||= PgDice::Configuration.new
yield(configuration)
configuration.validate! if validate_configuration
end
|
.partition_helper ⇒ Object
69
70
71
72
73
|
# File 'lib/pgdice.rb', line 69
def partition_helper
raise PgDice::NotConfiguredError, 'partition_helper' unless configuration
configuration.partition_helper
end
|
.partition_manager ⇒ Object
63
64
65
66
67
|
# File 'lib/pgdice.rb', line 63
def partition_manager
raise PgDice::NotConfiguredError, 'partition_manager' unless configuration
configuration.partition_manager
end
|
.validation ⇒ Object
75
76
77
78
79
|
# File 'lib/pgdice.rb', line 75
def validation
raise PgDice::NotConfiguredError, 'validation' unless configuration
configuration.validation
end
|