When constructing the SQL for the expression
`Concat(Lower(Ref('some_field', None)), Value('x')).as_sql(...)`, Django
returns the SQL with placeholders for the values:
{{{#!python
>>> Concat(Lower(Ref('some_field', None)), Value('x')).as_sql(compiler,
connection)
('CONCAT(LOWER("some_field"), %s)', ['x'])
}}}
Since the whole API for `Index.create_sql()` and
`SchemaEditor.add_index()` etc. API is new in Django 1.11 let's try to get
ahead of a necessary deprecation at a later time by passing the SQL
statement and empty params by default, for now.
--
Ticket URL: <https://code.djangoproject.com/ticket/27663>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* owner: nobody => Markus Holtermann
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:1>
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:2>
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/7764
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:4>
* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted
Comment:
Looking at #25809 again I noticed that `SchemaEditor.quote_value()` is
sufficient when creating the SQL query as none of the values put through
that function are user defined but defined at development time by
developers.
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:5>
Comment (by Markus Holtermann):
And given that, I lean towards closing as wontfix or worksforme.
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:6>
* status: assigned => closed
* resolution: => wontfix
Comment:
Closing as per explanation above.
--
Ticket URL: <https://code.djangoproject.com/ticket/27663#comment:7>