Class: RandomRails::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/random-rails/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_sizesObject

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_strategyObject

Returns the value of attribute default_strategy.



5
6
7
# File 'lib/random-rails/configuration.rb', line 5

def default_strategy
  @default_strategy
end

#precisionObject

Returns the value of attribute precision.



5
6
7
# File 'lib/random-rails/configuration.rb', line 5

def precision
  @precision
end

#tablesample_thresholdObject

Returns the value of attribute tablesample_threshold.



5
6
7
# File 'lib/random-rails/configuration.rb', line 5

def tablesample_threshold
  @tablesample_threshold
end