mirror of
https://github.com/django/django.git
synced 2025-08-14 07:48:28 +00:00
[1.9.x] Normalized "an SQL" spelling.
Backport of 575a9a791e
from master
This commit is contained in:
parent
3c6b9f0bbd
commit
fef3f50e31
8 changed files with 11 additions and 11 deletions
|
@ -71,7 +71,7 @@ We then need to define the ``as_sql`` method. This takes a ``SQLCompiler``
|
|||
object, called ``compiler``, and the active database connection.
|
||||
``SQLCompiler`` objects are not documented, but the only thing we need to know
|
||||
about them is that they have a ``compile()`` method which returns a tuple
|
||||
containing a SQL string, and the parameters to be interpolated into that
|
||||
containing an SQL string, and the parameters to be interpolated into that
|
||||
string. In most cases, you don't need to use it directly and can pass it on to
|
||||
``process_lhs()`` and ``process_rhs()``.
|
||||
|
||||
|
@ -92,7 +92,7 @@ example, ``process_lhs`` returns ``('"author"."name"', [])`` and
|
|||
parameters for the left hand side, but this would depend on the object we have,
|
||||
so we still need to include them in the parameters we return.
|
||||
|
||||
Finally we combine the parts into a SQL expression with ``<>``, and supply all
|
||||
Finally we combine the parts into an SQL expression with ``<>``, and supply all
|
||||
the parameters for the query. We then return a tuple containing the generated
|
||||
SQL string and the parameters.
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ makes it possible to refer to model field values and perform database
|
|||
operations using them without actually having to pull them out of the database
|
||||
into Python memory.
|
||||
|
||||
Instead, Django uses the ``F()`` object to generate a SQL expression that
|
||||
Instead, Django uses the ``F()`` object to generate an SQL expression that
|
||||
describes the required operation at the database level.
|
||||
|
||||
This is easiest to understand through an example. Normally, one might do
|
||||
|
|
|
@ -651,7 +651,7 @@ Tests
|
|||
|
||||
* Added test client support for file uploads with file-like objects.
|
||||
|
||||
* A shared cache is now used when testing with a SQLite in-memory database when
|
||||
* A shared cache is now used when testing with an SQLite in-memory database when
|
||||
using Python 3.4+ and SQLite 3.7.13+. This allows sharing the database
|
||||
between threads.
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ control the particular collation used by the test database. See the
|
|||
:doc:`settings documentation </ref/settings>` for details of these
|
||||
and other advanced settings.
|
||||
|
||||
If using a SQLite in-memory database with Python 3.4+ and SQLite 3.7.13+,
|
||||
If using an SQLite in-memory database with Python 3.4+ and SQLite 3.7.13+,
|
||||
`shared cache <https://www.sqlite.org/sharedcache.html>`_ will be enabled, so
|
||||
you can write tests with ability to share the database between threads.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue