mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
results.dicts() method, closes #2414
This commit is contained in:
parent
dc288056b8
commit
92c4d41ca6
6 changed files with 28 additions and 17 deletions
|
|
@ -1093,6 +1093,9 @@ The ``Results`` object also has the following properties and methods:
|
|||
``.rows`` - list of ``sqlite3.Row``
|
||||
This property provides direct access to the list of rows returned by the database. You can access specific rows by index using ``results.rows[0]``.
|
||||
|
||||
``.dicts()`` - list of ``dict``
|
||||
This method returns a list of Python dictionaries, one for each row.
|
||||
|
||||
``.first()`` - row or None
|
||||
Returns the first row in the results, or ``None`` if no rows were returned.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue