mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
StatementCache is private API
It should not be used in applications
This commit is contained in:
parent
fd8cbcef73
commit
07f4bd5b60
1 changed files with 6 additions and 6 deletions
|
@ -13,10 +13,10 @@ module ActiveRecord
|
||||||
#
|
#
|
||||||
# The relation returned by the block is cached, and for each +execute+ call the cached relation gets duped.
|
# The relation returned by the block is cached, and for each +execute+ call the cached relation gets duped.
|
||||||
# Database is queried when +to_a+ is called on the relation.
|
# Database is queried when +to_a+ is called on the relation.
|
||||||
class StatementCache
|
class StatementCache # :nodoc:
|
||||||
class Substitute; end
|
class Substitute; end # :nodoc:
|
||||||
|
|
||||||
class Query
|
class Query # :nodoc:
|
||||||
def initialize(sql)
|
def initialize(sql)
|
||||||
@sql = sql
|
@sql = sql
|
||||||
end
|
end
|
||||||
|
@ -26,7 +26,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class PartialQuery < Query
|
class PartialQuery < Query # :nodoc:
|
||||||
def initialize values
|
def initialize values
|
||||||
@values = values
|
@values = values
|
||||||
@indexes = values.each_with_index.find_all { |thing,i|
|
@indexes = values.each_with_index.find_all { |thing,i|
|
||||||
|
@ -51,11 +51,11 @@ module ActiveRecord
|
||||||
PartialQuery.new collected
|
PartialQuery.new collected
|
||||||
end
|
end
|
||||||
|
|
||||||
class Params
|
class Params # :nodoc:
|
||||||
def bind; Substitute.new; end
|
def bind; Substitute.new; end
|
||||||
end
|
end
|
||||||
|
|
||||||
class BindMap
|
class BindMap # :nodoc:
|
||||||
def initialize(bind_values)
|
def initialize(bind_values)
|
||||||
@indexes = []
|
@indexes = []
|
||||||
@bind_values = bind_values
|
@bind_values = bind_values
|
||||||
|
|
Loading…
Reference in a new issue