Class: Shameless::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/shameless/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connection_optionsObject

Returns the value of attribute connection_options.



3
4
5
# File 'lib/shameless/configuration.rb', line 3

def connection_options
  @connection_options
end

#create_table_optionsObject

Returns the value of attribute create_table_options.



3
4
5
# File 'lib/shameless/configuration.rb', line 3

def create_table_options
  @create_table_options
end

#database_extensionsObject

Returns the value of attribute database_extensions.



3
4
5
# File 'lib/shameless/configuration.rb', line 3

def database_extensions
  @database_extensions
end

#legacy_created_at_is_bigintObject

Needed to deal with our legacy schema that stores created_at as an integer timestamp and does date conversions in Ruby-land, don’t set to ‘true` for new projects



8
9
10
# File 'lib/shameless/configuration.rb', line 8

def legacy_created_at_is_bigint
  @legacy_created_at_is_bigint
end

#partition_urlsObject

Returns the value of attribute partition_urls.



3
4
5
# File 'lib/shameless/configuration.rb', line 3

def partition_urls
  @partition_urls
end

#shards_countObject

Returns the value of attribute shards_count.



3
4
5
# File 'lib/shameless/configuration.rb', line 3

def shards_count
  @shards_count
end

Instance Method Details

#partitions_countObject



14
15
16
# File 'lib/shameless/configuration.rb', line 14

def partitions_count
  partition_urls.count
end

#shards_per_partition_countObject



10
11
12
# File 'lib/shameless/configuration.rb', line 10

def shards_per_partition_count
  shards_count / partitions_count
end