File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,17 @@ of dictionaries in order of query execution. Each dictionary has the following::
25
25
``connection.queries`` includes all SQL statements -- INSERTs, UPDATES,
26
26
SELECTs, etc. Each time your app hits the database, the query will be recorded.
27
27
Note that the raw SQL logged in ``connection.queries`` may not include
28
- parameter quoting. Parameter quoting is performed by the database-specific
28
+ parameter quoting. Parameter quoting is performed by the database-specific
29
29
backend, and not all backends provide a way to retrieve the SQL after quoting.
30
30
31
+ .. versionadded:: 1.2
32
+
33
+ If you are using :ref:`multiple databases<topics-db-multi-db>`, you can use the
34
+ same interface on each member of the ``connections`` dictionary::
35
+
36
+ >>> from django.db import connections
37
+ >>> connections['my_db_alias'].queries
38
+
31
39
Can I use Django with a pre-existing database?
32
40
----------------------------------------------
33
41
You can’t perform that action at this time.
0 commit comments