Module: ActiveOutbox::AdapterHelper
- Included in:
- Generators::ModelGenerator
- Defined in:
- lib/active_outbox/adapter_helper.rb
Class Method Summary collapse
Class Method Details
.json_type ⇒ Object
12 13 14 15 16 17 |
# File 'lib/active_outbox/adapter_helper.rb', line 12 def self.json_type return 'jsonb' if postgres? return 'json' if mysql? 'string' end |
.mysql? ⇒ Boolean
23 24 25 |
# File 'lib/active_outbox/adapter_helper.rb', line 23 def self.mysql? ActiveRecord::Base.connection.adapter_name.downcase == 'mysql2' end |
.postgres? ⇒ Boolean
19 20 21 |
# File 'lib/active_outbox/adapter_helper.rb', line 19 def self.postgres? ActiveRecord::Base.connection.adapter_name.downcase == 'postgresql' end |
.uuid_type ⇒ Object
5 6 7 8 9 10 |
# File 'lib/active_outbox/adapter_helper.rb', line 5 def self.uuid_type return 'uuid' if postgres? return 'string' if mysql? 'string' end |