activerecord-futures 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +20 -0
- data/Gemfile +11 -1
- data/README.md +43 -23
- data/Rakefile +17 -0
- data/activerecord-futures.gemspec +3 -1
- data/lib/active_record/connection_adapters/future_enabled.rb +34 -0
- data/lib/active_record/connection_adapters/future_enabled_mysql2_adapter.rb +23 -22
- data/lib/active_record/connection_adapters/future_enabled_postgresql_adapter.rb +52 -0
- data/lib/active_record/futures.rb +10 -9
- data/lib/active_record/futures/delegation.rb +1 -0
- data/lib/active_record/futures/future.rb +22 -6
- data/lib/active_record/futures/future_calculation.rb +4 -12
- data/lib/active_record/futures/future_calculation_array.rb +8 -0
- data/lib/active_record/futures/future_calculation_value.rb +11 -0
- data/lib/active_record/futures/future_relation.rb +12 -11
- data/lib/active_record/futures/proxy.rb +37 -0
- data/lib/active_record/futures/query_recording.rb +12 -26
- data/lib/activerecord-futures.rb +3 -0
- data/lib/activerecord-futures/version.rb +1 -1
- data/spec/active_record/futures/future_relation_spec.rb +9 -1
- data/spec/active_record/futures/proxy_spec.rb +51 -0
- data/spec/db/schema.rb +15 -6
- data/spec/in_action/combination_of_futures_spec.rb +153 -0
- data/spec/in_action/future_count_execution_spec.rb +98 -0
- data/spec/in_action/future_fulfillment_spec.rb +10 -7
- data/spec/in_action/future_pluck_execution_spec.rb +44 -0
- data/spec/in_action/future_relation_execution_spec.rb +52 -0
- data/spec/models/comment.rb +4 -0
- data/spec/models/post.rb +3 -0
- data/spec/models/user.rb +1 -0
- data/spec/spec_helper.rb +45 -9
- data/spec/support/matchers/exec.rb +66 -0
- data/spec/support/matchers/exec_query.rb +23 -0
- metadata +60 -6
- data/spec/models/country.rb +0 -2
data/spec/models/country.rb
DELETED