module Neighbor::Utils

def self.adapter(model)

def self.adapter(model)
  case model.connection_db_config.adapter
  when /sqlite/i
    :sqlite
  when /mysql|trilogy/i
    model.connection_pool.with_connection { |c| c.try(:mariadb?) } ? :mariadb : :mysql
  else
    :postgresql
  end
end