diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-08-10 08:11:47 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-07 23:22:21 +0900 |
commit | 452a814cf014a6fbd33c380b8f7c13b03edaa531 (patch) | |
tree | 4ad91d605cb995935e32b9be1fbfb3ab3fdb26e3 /activerecord/test/cases/adapters/sqlite3 | |
parent | c9b514cd3e8fe7d74ae91ecd30db839132e7899c (diff) | |
download | rails-452a814cf014a6fbd33c380b8f7c13b03edaa531.tar.gz rails-452a814cf014a6fbd33c380b8f7c13b03edaa531.tar.bz2 rails-452a814cf014a6fbd33c380b8f7c13b03edaa531.zip |
Make preload query to preparable
Currently preload query cannot be prepared statements even if
`prepared_statements: true` due to array handler in predicate builder
doesn't support making bind params. This makes preload query to
preparable by don't passing array value if possible.
Diffstat (limited to 'activerecord/test/cases/adapters/sqlite3')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/explain_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/explain_test.rb b/activerecord/test/cases/adapters/sqlite3/explain_test.rb index 29d97ae78c..b907a7ae0f 100644 --- a/activerecord/test/cases/adapters/sqlite3/explain_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/explain_test.rb @@ -15,7 +15,7 @@ class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase explain = Developer.where(id: 1).includes(:audit_logs).explain assert_match %r(EXPLAIN for: SELECT "developers"\.\* FROM "developers" WHERE "developers"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE developers USING (INTEGER )?PRIMARY KEY/, explain) - assert_match %(EXPLAIN for: SELECT "audit_logs".* FROM "audit_logs" WHERE "audit_logs"."developer_id" = 1), explain + assert_match %r(EXPLAIN for: SELECT "audit_logs"\.\* FROM "audit_logs" WHERE "audit_logs"\."developer_id" = (?:\? \[\["developer_id", 1\]\]|1)), explain assert_match(/(SCAN )?TABLE audit_logs/, explain) end end |