Class: Shameless::Configuration
- Inherits:
-
Object
- Object
- Shameless::Configuration
- Defined in:
- lib/shameless/configuration.rb
Instance Attribute Summary collapse
-
#connection_options ⇒ Object
Returns the value of attribute connection_options.
-
#create_table_options ⇒ Object
Returns the value of attribute create_table_options.
-
#database_extensions ⇒ Object
Returns the value of attribute database_extensions.
-
#legacy_created_at_is_bigint ⇒ Object
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.
-
#partition_urls ⇒ Object
Returns the value of attribute partition_urls.
-
#shards_count ⇒ Object
Returns the value of attribute shards_count.
Instance Method Summary collapse
Instance Attribute Details
#connection_options ⇒ Object
Returns the value of attribute connection_options.
3 4 5 |
# File 'lib/shameless/configuration.rb', line 3 def @connection_options end |
#create_table_options ⇒ Object
Returns the value of attribute create_table_options.
3 4 5 |
# File 'lib/shameless/configuration.rb', line 3 def @create_table_options end |
#database_extensions ⇒ Object
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_bigint ⇒ Object
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_urls ⇒ Object
Returns the value of attribute partition_urls.
3 4 5 |
# File 'lib/shameless/configuration.rb', line 3 def partition_urls @partition_urls end |
#shards_count ⇒ Object
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_count ⇒ Object
14 15 16 |
# File 'lib/shameless/configuration.rb', line 14 def partitions_count partition_urls.count end |
#shards_per_partition_count ⇒ Object
10 11 12 |
# File 'lib/shameless/configuration.rb', line 10 def shards_per_partition_count shards_count / partitions_count end |