Skip to content

Commit 32000cc

Browse files
committed
show an example response from a select query when doing a join
1 parent e37850a commit 32000cc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

docs/src/piccolo/query_types/select.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ One of the most powerful things about select is it's support for joins.
5050

5151
.. code-block:: python
5252
53-
b = Band
54-
b.select(
55-
b.name,
56-
b.manager.name
57-
).run_sync()
53+
>>> b = Band
54+
>>> b.select(b.name, b.manager.name).run_sync()
55+
[{'name': 'Pythonistas', 'manager.name': 'Guido'}, {'name': 'Rustaceans', 'manager.name': 'Graydon'}]
5856
5957
6058
The joins can go several layers deep.
@@ -163,7 +161,7 @@ To return the data as a JSON string:
163161
Piccolo can use `orjson <https://github.com/ijl/orjson>`_ for JSON serialisation,
164162
which is blazing fast, and can handle most Python types, including dates,
165163
datetimes, and UUIDs. To install Piccolo with orjson support use
166-
`pip install piccolo[orjson]`.
164+
``pip install piccolo[orjson]``.
167165

168166
where
169167
~~~~~

0 commit comments

Comments
 (0)