方法
Attributes
| [RW] | preparable | |
| [RW] | retryable |
类公共方法
new() 链接
来源: 显示 | 在 GitHub 上
# File activerecord/lib/active_record/statement_cache.rb, line 71 def initialize @parts = [] @binds = [] end
实例公共方法
<<(str) 链接
来源: 显示 | 在 GitHub 上
# File activerecord/lib/active_record/statement_cache.rb, line 76 def <<(str) @parts << str self end
add_bind(obj, &) 链接
来源: 显示 | 在 GitHub 上
# File activerecord/lib/active_record/statement_cache.rb, line 81 def add_bind(obj, &) @binds << obj @parts << Substitute.new self end
add_binds(binds, proc_for_binds = nil, &) 链接
来源: 显示 | 在 GitHub 上
# File activerecord/lib/active_record/statement_cache.rb, line 87 def add_binds(binds, proc_for_binds = nil, &) @binds.concat proc_for_binds ? binds.map(&proc_for_binds) : binds binds.size.times do |i| @parts << ", " unless i == 0 @parts << Substitute.new end self end
value() 链接
来源: 显示 | 在 GitHub 上
# File activerecord/lib/active_record/statement_cache.rb, line 96 def value [@parts, @binds] end