sunstone 5.1.0.4 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +5 -13
- data/ext/active_record/associations.rb +2 -7
- data/ext/active_record/associations/collection_association.rb +25 -18
- data/ext/active_record/attribute_methods.rb +19 -35
- data/ext/active_record/finder_methods.rb +138 -90
- data/ext/active_record/persistence.rb +16 -11
- data/ext/active_record/relation.rb +7 -47
- data/ext/active_record/relation/calculations.rb +5 -3
- data/ext/active_record/relation/query_methods.rb +9 -0
- data/ext/active_record/statement_cache.rb +4 -6
- data/ext/active_record/transactions.rb +9 -19
- data/ext/arel/nodes/select_statement.rb +26 -12
- data/lib/active_record/connection_adapters/sunstone/database_statements.rb +76 -25
- data/lib/active_record/connection_adapters/sunstone/type/json.rb +1 -1
- data/lib/active_record/connection_adapters/sunstone_adapter.rb +2 -3
- data/lib/arel/collectors/sunstone.rb +21 -19
- data/lib/arel/visitors/sunstone.rb +4 -8
- data/lib/sunstone.rb +2 -3
- data/lib/sunstone/connection.rb +2 -2
- data/lib/sunstone/exception.rb +8 -1
- data/lib/sunstone/version.rb +1 -1
- data/sunstone.gemspec +3 -3
- data/test/active_record/associations/has_many_test.rb +30 -2
- data/test/active_record/eager_loading_test.rb +10 -0
- data/test/active_record/persistance_test.rb +7 -7
- data/test/active_record/query/count_test.rb +13 -0
- data/test/active_record/query_test.rb +6 -6
- data/test/sunstone/connection/send_request_test.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +9 -10
- data/ext/active_record/associations/association.rb +0 -16
- data/ext/active_record/batches.rb +0 -12
@@ -1,16 +0,0 @@
|
|
1
|
-
module ActiveRecord
|
2
|
-
module Associations
|
3
|
-
class Association #:nodoc:
|
4
|
-
|
5
|
-
def skip_statement_cache?
|
6
|
-
return true if !klass.connection.supports_statement_cache?
|
7
|
-
|
8
|
-
reflection.has_scope? ||
|
9
|
-
scope.eager_loading? ||
|
10
|
-
klass.scope_attributes? ||
|
11
|
-
reflection.source_reflection.active_record.default_scopes.any?
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|