Class: ActiveVersion::Runtime::NullAdapter
- Inherits:
-
Object
- Object
- ActiveVersion::Runtime::NullAdapter
- Defined in:
- lib/active_version/runtime.rb
Instance Method Summary collapse
- #base_connection ⇒ Object
- #connection_for(model_class, _version_type) ⇒ Object
- #supports_current_transaction_id?(connection) ⇒ Boolean
- #supports_partition_catalog_checks?(connection) ⇒ Boolean
- #supports_transactional_context?(connection) ⇒ Boolean
Instance Method Details
#base_connection ⇒ Object
6 7 8 |
# File 'lib/active_version/runtime.rb', line 6 def base_connection raise ActiveVersion::ConfigurationError, "No runtime adapter available" end |
#connection_for(model_class, _version_type) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/active_version/runtime.rb', line 10 def connection_for(model_class, _version_type) if model_class.respond_to?(:connection) model_class.connection else raise ActiveVersion::ConfigurationError, "#{model_class} does not expose .connection. Configure ActiveVersion.runtime_adapter for this backend." end end |
#supports_current_transaction_id?(connection) ⇒ Boolean
23 24 25 |
# File 'lib/active_version/runtime.rb', line 23 def supports_current_transaction_id?(connection) postgresql_connection?(connection) end |
#supports_partition_catalog_checks?(connection) ⇒ Boolean
27 28 29 |
# File 'lib/active_version/runtime.rb', line 27 def supports_partition_catalog_checks?(connection) postgresql_connection?(connection) end |
#supports_transactional_context?(connection) ⇒ Boolean
19 20 21 |
# File 'lib/active_version/runtime.rb', line 19 def supports_transactional_context?(connection) postgresql_connection?(connection) end |