module ActiveRecord::ConnectionAdapters::Quoting::ClassMethods

def column_name_matcher

"#{column_name}"
"#{table_name}.#{column_name}"

Matches the following:
Regexp for column names (with or without a table name prefix).
:nodoc:
def column_name_matcher
  /
    \A
    (
      (?:
        # table_name.column_name | function(one or no argument)
        ((?:\w+\.)?\w+ | \w+\((?:|\g<2>)\))
      )
      (?:(?:\s+AS)?\s+\w+)?
    )
    (?:\s*,\s*\g<1>)*
    \z
  /ix
end