1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record
Sean Griffin 10f75af933 Use bind values for joined tables in where statements
In practical terms, this allows serialized columns and tz aware columns
to be used in wheres that go through joins, where they previously would
not behave correctly. Internally, this removes 1/3 of the cases where we
rely on Arel to perform type casting for us.

There were two non-obvious changes required for this. `update_all` on
relation was merging its bind values with arel's in the wrong order.
Additionally, through associations were assuming there would be no bind
parameters in the preloader (presumably because the where would always
be part of a join)

[Melanie Gilman & Sean Griffin]
2014-11-01 15:39:51 -06:00
..
associations Use bind values for joined tables in where statements 2014-11-01 15:39:51 -06:00
attribute_methods let's warn with heredocs 2014-10-28 16:35:24 -07:00
attribute_set some object allocation reduction for new AR objects 2014-09-27 11:00:58 +04:00
coders Merge pull request #16162 from chancancode/fix_json_coder 2014-07-15 08:43:54 -07:00
connection_adapters Merge pull request #17463 from mrgilman/remove-index-from-substitute-at 2014-11-01 14:39:59 -06:00
fixture_set
locale
locking Stop using instance exec for type decorators 2014-06-27 11:33:32 -06:00
migration Merge pull request #16305 from tomkadwill/documented_change_table 2014-07-28 15:07:30 -03:00
railties Use Hash#each_key instead of Hash#keys.each 2014-09-29 17:27:10 +02:00
relation Use bind values for joined tables in where statements 2014-11-01 15:39:51 -06:00
scoping Merge pull request #17374 from maurogeorge/scope-exception 2014-10-27 09:49:50 +01:00
serializers Remove serialized? from the type interface 2014-06-13 17:04:04 -06:00
tasks Don't attempt to load the schema file in tests if none exists 2014-10-31 16:56:18 -06:00
type Use the correct values for int max and min 2014-10-31 13:25:16 -06:00
validations Add a note on custom validation contexts. 2014-08-05 13:13:40 -07:00
aggregations.rb
association_relation.rb
associations.rb Raise an error for has_one associations which try to go :through a polymorphic association [#17263] 2014-10-15 20:25:09 +07:00
attribute.rb Implement _was and changes for in-place mutations of AR attributes 2014-08-16 23:08:41 -07:00
attribute_assignment.rb Silence warning in test 2014-06-24 07:11:54 -06:00
attribute_decorators.rb Stop using instance exec for type decorators 2014-06-27 11:33:32 -06:00
attribute_methods.rb edit pass over all warnings 2014-10-28 17:47:32 -07:00
attribute_set.rb AttributeSet#include? -> AttributeSet#key? 2014-07-11 07:50:16 -06:00
attributes.rb Don't modify the columns hash to set defaults from the attributes API 2014-10-31 16:06:14 -06:00
autosave_association.rb Autosave callbacks shouldn't be after_save 2014-10-13 17:50:32 +03:00
base.rb Fix typo and remove code block since present is not a method. 2014-07-28 13:44:37 -03:00
callbacks.rb Prefix internal method with _ 2014-10-25 17:12:19 -07:00
connection_handling.rb If Rails is not defined, check ENV["RAILS_ENV"] and ENV["RACK_ENV"]. 2014-10-21 11:09:34 -07:00
core.rb Treat strings greater than int max value as out of range 2014-10-31 12:15:36 -06:00
counter_cache.rb No need to call to_sym here 2014-09-20 18:05:01 +09:00
dynamic_matchers.rb
enum.rb Implement _was and changes for in-place mutations of AR attributes 2014-08-16 23:08:41 -07:00
errors.rb Merge pull request #17019 from yuki24/add-class-name-to-unknown-attr-error 2014-10-20 08:49:27 +02:00
explain.rb Fixed typo in comment 2014-07-19 00:20:41 -07:00
explain_registry.rb
explain_subscriber.rb
fixtures.rb Merge pull request #17014 from grosser/grosser/fast-fixtures 2014-10-10 09:11:56 -07:00
gem_version.rb Prepare for 4.2.0.beta4 release 2014-10-30 14:12:24 -07:00
inheritance.rb edit pass over all warnings 2014-10-28 17:47:32 -07:00
integration.rb Use #model_name on instances instead of classes 2014-06-24 17:20:24 -07:00
log_subscriber.rb
migration.rb Don't attempt to load the schema file in tests if none exists 2014-10-31 16:56:18 -06:00
model_schema.rb Don't modify the columns hash to set defaults from the attributes API 2014-10-31 16:06:14 -06:00
nested_attributes.rb
no_touching.rb
null_relation.rb
persistence.rb Implement _was and changes for in-place mutations of AR attributes 2014-08-16 23:08:41 -07:00
query_cache.rb remove blank lines in the start of the ActiveRecord files 2014-07-29 02:51:08 +04:00
querying.rb measure record instantiation time in AS::Notifications 2014-10-13 14:24:16 -07:00
railtie.rb
readonly_attributes.rb remove blank lines in the start of the ActiveRecord files 2014-07-29 02:51:08 +04:00
reflection.rb let's warn with heredocs 2014-10-28 16:35:24 -07:00
relation.rb Use bind values for joined tables in where statements 2014-11-01 15:39:51 -06:00
result.rb add length to ActiveRecord::Result 2014-10-13 12:01:41 -07:00
runtime_registry.rb
sanitization.rb [ci skip] Use an for SQL 2014-06-14 17:18:48 +05:30
schema.rb remove blank lines in the start of the ActiveRecord files 2014-07-29 02:51:08 +04:00
schema_dumper.rb add bigserial pk support 2014-10-29 18:12:22 -07:00
schema_migration.rb Extract AR::SchemaMigration.normalized_versions method 2014-06-27 20:16:21 +03:00
scoping.rb
serialization.rb
statement_cache.rb
store.rb add missing :nodoc: to store.rb. [ci skip] 2014-06-24 13:58:07 +02:00
timestamp.rb Implement _was and changes for in-place mutations of AR attributes 2014-08-16 23:08:41 -07:00
transactions.rb Prefix internal method with _ 2014-10-25 17:12:19 -07:00
translation.rb
type.rb Treat strings greater than int max value as out of range 2014-10-31 12:15:36 -06:00
validations.rb Moved #create! method from Validations to Persistence module 2014-08-05 18:36:29 +03:00
version.rb