lib/active_record/connection_adapters/tidb_adapter.rb
def tidb_connection(config) # :nodoc:
      config = config.symbolize_keys
      config[:flags] ||= 0

      if config[:flags].is_a? Array
        config[:flags].push 'FOUND_ROWS'
      else
        config[:flags] |= Mysql2::Client::FOUND_ROWS
      end

      ConnectionAdapters::TidbAdapter.new(
        ConnectionAdapters::Mysql2Adapter.new_client(config),
        logger,
        nil,
        config
      )
    end
# :nodoc:
# Establishes a connection to the database that's used by all Active Record objects.
:nodoc:
Establishes a connection to the database that's used by all Active Record objects.
: nodoc : Establishes a connection to the database that ' s used by all Active Record objects .
def tidb_connection(config) 
      config = config.symbolize_keys
      config[:flags] ||= 0
      if config[:flags].is_a? Array
        config[:flags].push 'FOUND_ROWS'
      else
        config[:flags] |= Mysql2::Client::FOUND_ROWS
      end
      ConnectionAdapters::TidbAdapter.new(
        ConnectionAdapters::Mysql2Adapter.new_client(config),
        logger,
        nil,
        config
      )
    end
def tidb_connection ( config ) config = config . symbolize_keys config [ :flags ] ||= 0 if config [ :flags ] . is_a? Array config [ :flags ] . push 'FOUND_ROWS' else config [ :flags ] |= Mysql2 :: Client :: FOUND_ROWS end ConnectionAdapters :: TidbAdapter . new ( ConnectionAdapters :: Mysql2Adapter . new_client ( config ) , logger , nil , config ) end
:nodoc:
Establishes a connection to the database that's used by all Active Record objects.
: nodoc : Establishes a connection to the database that ' s used by all Active Record objects .
# :nodoc:
config