提交 020b0374 编写于 作者: A Aaron Patterson

PERF: cache the engine in the formatter

上级 23294241
module Arel
module Sql
class Formatter
attr_reader :environment, :christener
attr_reader :environment, :christener, :engine
def initialize(environment)
@environment = environment
@christener = environment.christener
@engine = environment.engine
end
def name_for thing
@christener.name_for thing
end
def engine
@environment.engine
end
def quote_column_name name
engine.connection.quote_column_name name
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册