| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Context: https://github.com/rails/rails/pull/29301#issuecomment-353200233
|
|
|
|
|
|
|
|
| |
Currently, sanitize methods are private. So need `send` to use from
outside class.
However, sometimes want to use sanitize methods from outside Class when
want to generate SQL including multiple tables like search.
In order to avoid using `send` in such a case, changed methods to public.
|
|
|
|
| |
object
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
|
|
|
|
| |
Originally `quoted_id` was used in legacy quoting mechanism. Now we use
type casting mechanism for that. Let's deprecate `quoted_id`.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|\
| |
| |
| |
| | |
yui-knk/add_test_sanitize_sql_array_handles_named_bind_variables
Add test cases for `#sanitize_sql_array` with named_bind_variables
|
| |
| |
| |
| |
| | |
And add code examples to `sanitize_sql_for_conditions`,
`sanitize_sql_for_assignment`, and `sanitize_sql_array`.
|
|/
|
|
|
|
| |
`replace_named_bind_variables` and `replace_bind_variables` are
definded in `sanitization.rb`, so it is reasonable these tests are
on `sanitize_test.rb`.
|
|
|
|
|
|
| |
Sure unquoted SQL code pass test, but this % style prepared statements
are dangerous. Test codes and code examples are also "Rails" codes,
so quote placeholder of prepared statements.
|
| |
|
| |
|
|
|
|
| |
`warning: ambiguous first argument; put parentheses or even spaces`
|
|
|
|
|
|
| |
* This is a follow up to: fe4b0eee05f59831e1468ed50f55fbad0ce11e1d
* The originating PR is #14222
* It should fix the build
|
|
|
|
|
|
|
|
|
| |
Closes #14222.
This is a follow up to #6104
This does not have the backwards compatibility issues brought up in
implementation to break.
|
|
|
|
| |
check it is handles empty statement
|
|
|
|
|
|
|
|
|
| |
Generated sub-query for Relation as array condition for `where` method
did not take in account its bind values, in result generates invalid SQL query.
Fixed by adding sub-query relation's binding values to base relation
Closes: #12586
|
|
|
|
|
|
|
|
|
| |
Instead of executing 2 queries for fetching records filtered by array condition with Relation,
added generation of subquery to current query.
This behaviour will be consistent when passes Relation as hash condition to where
Closes: #12415
|
|
|
|
|
|
|
| |
Because of each adapter implementation differences,
`expected_value` string needed to be handled by each adapter.
This commit removes current_adapter
by using ActiveRecord::ConnectionAdapters::Quoting methods.
|
| |
|
|
|
|
|
|
|
|
| |
Fixing CHANGLOG description
Remove extra line.
Remove blank lines.
|
| |
|
|
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
| |
|
|
values.
- Adds String#acts_like_string?
- Adds Chars#acts_like_string?
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1029 state:committed]
|