mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-29 04:14:32 +02:00
--raw-lines option, closes #539
This commit is contained in:
parent
8f9a729e8a
commit
373b7886d2
4 changed files with 70 additions and 3 deletions
|
|
@ -124,6 +124,7 @@ See :ref:`cli_query`.
|
|||
--json-cols Detect JSON cols and output them as JSON, not
|
||||
escaped strings
|
||||
-r, --raw Raw output, first column of first row
|
||||
--raw-lines Raw output, first column of each row
|
||||
-p, --param <TEXT TEXT>... Named :parameters for SQL query
|
||||
--functions TEXT Python code defining one or more custom SQL
|
||||
functions
|
||||
|
|
@ -192,6 +193,7 @@ See :ref:`cli_memory`.
|
|||
--json-cols Detect JSON cols and output them as JSON, not
|
||||
escaped strings
|
||||
-r, --raw Raw output, first column of first row
|
||||
--raw-lines Raw output, first column of each row
|
||||
-p, --param <TEXT TEXT>... Named :parameters for SQL query
|
||||
--encoding TEXT Character encoding for CSV input, defaults to
|
||||
utf-8
|
||||
|
|
|
|||
|
|
@ -239,6 +239,9 @@ For example, to retrieve a binary image from a ``BLOB`` column and store it in a
|
|||
|
||||
$ sqlite-utils photos.db "select contents from photos where id=1" --raw > myphoto.jpg
|
||||
|
||||
To return the first column of each result as raw data, separated by newlines, use ``--raw-lines``::
|
||||
|
||||
$ sqlite-utils photos.db "select caption from photos" --raw-lines > captions.txt
|
||||
|
||||
.. _cli_query_parameters:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue