Class: SolidObserver::Services::StorageInfoSnapshot::RecordCount
- Inherits:
-
Object
- Object
- SolidObserver::Services::StorageInfoSnapshot::RecordCount
- Defined in:
- lib/solid_observer/services/storage_info_snapshot.rb
Instance Method Summary collapse
-
#initialize(connection, table_name) ⇒ RecordCount
constructor
A new instance of RecordCount.
- #solid_cache_count ⇒ Object
Constructor Details
#initialize(connection, table_name) ⇒ RecordCount
Returns a new instance of RecordCount.
9 10 11 12 |
# File 'lib/solid_observer/services/storage_info_snapshot.rb', line 9 def initialize(connection, table_name) @connection = connection @table_name = table_name end |
Instance Method Details
#solid_cache_count ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/solid_observer/services/storage_info_snapshot.rb', line 14 def solid_cache_count case adapter_key when :postgresql then postgresql_approximate_count when :mysql then mysql_approximate_count else yield end end |