Class: RandomRails::Configuration
- Inherits:
-
Object
- Object
- RandomRails::Configuration
- Defined in:
- lib/random-rails/configuration.rb
Instance Attribute Summary collapse
-
#cache_table_sizes ⇒ Object
Returns the value of attribute cache_table_sizes.
-
#default_strategy ⇒ Object
Returns the value of attribute default_strategy.
-
#precision ⇒ Object
Returns the value of attribute precision.
-
#tablesample_threshold ⇒ Object
Returns the value of attribute tablesample_threshold.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 |
# File 'lib/random-rails/configuration.rb', line 7 def initialize @default_strategy = :auto @tablesample_threshold = 10_000 # Use TABLESAMPLE for tables larger than this @cache_table_sizes = true # Cache table size estimates @precision = 1.0 # Default precision for TABLESAMPLE end |
Instance Attribute Details
#cache_table_sizes ⇒ Object
Returns the value of attribute cache_table_sizes.
5 6 7 |
# File 'lib/random-rails/configuration.rb', line 5 def cache_table_sizes @cache_table_sizes end |
#default_strategy ⇒ Object
Returns the value of attribute default_strategy.
5 6 7 |
# File 'lib/random-rails/configuration.rb', line 5 def default_strategy @default_strategy end |
#precision ⇒ Object
Returns the value of attribute precision.
5 6 7 |
# File 'lib/random-rails/configuration.rb', line 5 def precision @precision end |
#tablesample_threshold ⇒ Object
Returns the value of attribute tablesample_threshold.
5 6 7 |
# File 'lib/random-rails/configuration.rb', line 5 def tablesample_threshold @tablesample_threshold end |