1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

24 commits

Author SHA1 Message Date
Daniel Colson
c1ceafc9d1 Autocorrect refute RuboCop violations
73e7aab behaved as expected on codeship, failing the build with
exactly these RuboCop violations. Hopefully `rubocop -a` will
have been enough to get a passing build!
2018-04-03 22:35:49 -04:00
Ryuta Kamizono
245c1dafa8 Enable Layout/LeadingCommentSpace to not allow cosmetic changes in the future
Follow up of #31432.
2017-12-14 17:30:54 +09:00
Ryuta Kamizono
510428ff64 Passing klass to StatementCache.new
Actually `StatementCache#execute` is always passed the same klass that
the owner klass of the connection when the statement cache is created.
So passing `klass` to `StatementCache.new` will make more DRY.
2017-08-04 02:27:50 +09:00
Kir Shatrov
831be98f9a Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
kenta-s
8646911292 Refactor test_find_by_does_not_use_statement_cache_if_table_name_is_changed 2017-02-13 19:28:37 +09:00
namusyaka
e8f170cec1
Make table_name= reset current statement cache
So queries are not run against the previous table name.

Closes #27953
2017-02-12 18:10:15 -07:00
Ryuta Kamizono
762e3f05f3 Add Style/EmptyLines in .rubocop.yml and remove extra empty lines 2016-08-07 17:50:59 +09:00
Xavier Noria
d22e522179 modernizes hash syntax in activerecord 2016-08-06 19:37:57 +02:00
Xavier Noria
9617db2078 applies new string literal convention in activerecord/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:26:53 +02:00
Sean Griffin
3af40b71f3 Prepared statements shouldn't share a cache with unprepared statements
When prepared statements are enabled, the statement cache caches the SQL
directly, including the bind parameters. If a similar query is run later
with prepared statements disabled, we need to use a separate cache
instead of trying to share the same one.

Fixes #24351
2016-03-31 13:41:36 -06:00
Aaron Patterson
09608ce9d2 use an array for bind params to simplify substitution 2014-04-12 18:40:29 -07:00
Aaron Patterson
dbc8c0ee36 decouple the factory method from the constructing model
The factory method only requires the constructing model to get the
connection object. Since the model is available when calling the factory
method, we can just pass the appropriate connection in.
2014-04-10 17:24:10 -07:00
Aaron Patterson
249fd686fb remove intelligence from StatementCache#initialize 2014-04-10 17:20:22 -07:00
Aaron Patterson
2d3969c82f stop caching the class on the statement cache object 2014-04-10 17:15:17 -07:00
Aaron Patterson
e7f5317ff9 change query strategy based on adapter 2014-01-16 15:38:05 -08:00
Aaron Patterson
f3e379f0c9 use a params hash so we know what bind parameters are used 2014-01-15 14:24:11 -08:00
Aaron Patterson
2de1bb859c fix statement cache execution 2014-01-14 14:33:03 -08:00
Aaron Patterson
74bfbfdb02 fix cache class interface 2014-01-14 14:26:00 -08:00
Noemj
eaf54865b1 Initial commit for select statements bindparam implementation 2013-05-15 17:20:23 +03:00
Vipul A M
127a2eea63 cleanup statement cache test 2013-04-11 18:08:46 +05:30
Rafael Mendonça França
0235cdf5ce Merge pull request #10152 from Noemj/statement_cache
Statement cache

Conflicts:
	activerecord/CHANGELOG.md
2013-04-10 16:02:26 -03:00
Noemj
af1a4bdc56 Added statement cache 2013-04-10 21:20:58 +03:00