mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-25 18:54:09 +02:00
sqlite-utils rows --order option, closes #469
This commit is contained in:
parent
f4fb78fa95
commit
7a9a6363ff
4 changed files with 16 additions and 0 deletions
|
|
@ -713,6 +713,7 @@ See :ref:`cli_rows`.
|
|||
Options:
|
||||
-c, --column TEXT Columns to return
|
||||
--where TEXT Optional where clause
|
||||
-o, --order TEXT Order by ('column' or 'column desc')
|
||||
-p, --param <TEXT TEXT>... Named :parameters for where clause
|
||||
--limit INTEGER Number of rows to return - defaults to everything
|
||||
--offset INTEGER SQL offset to use
|
||||
|
|
|
|||
|
|
@ -467,6 +467,8 @@ Or pass named parameters using ``--where`` in combination with ``-p``::
|
|||
$ sqlite-utils rows dogs.db dogs -c name --where 'name = :name' -p name Cleo
|
||||
[{"name": "Cleo"}]
|
||||
|
||||
You can define a sort order using ``--order column`` or ``--order 'column desc'``.
|
||||
|
||||
Use ``--limit N`` to only return the first ``N`` rows. Use ``--offset N`` to return rows starting from the specified offset.
|
||||
|
||||
.. note::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue