module ClosureTree::NumericOrderSupport

Public Class Methods

adapter_for_connection(connection) click to toggle source
# File lib/closure_tree/numeric_order_support.rb, line 4
def self.adapter_for_connection(connection)
  das = WithAdvisoryLock::DatabaseAdapterSupport.new(connection)
  if das.postgresql?
    ::ClosureTree::NumericOrderSupport::PostgreSQLAdapter
  elsif das.mysql?
    ::ClosureTree::NumericOrderSupport::MysqlAdapter
  else
    ::ClosureTree::NumericOrderSupport::GenericAdapter
  end
end