mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-20 07:24:23 +02:00
parent
d56029549a
commit
b4d953d3cc
3 changed files with 16 additions and 5 deletions
|
|
@ -2,6 +2,15 @@
|
||||||
Changelog
|
Changelog
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
.. _v2_7.1:
|
||||||
|
|
||||||
|
2.7.1 (2020-05-01)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- New ``sqlite-utils views my.db`` command for listing views in a database, see :ref:`cli_views`. (`#105 <https://github.com/simonw/sqlite-utils/issues/105>`__)
|
||||||
|
- ``sqlite-utils tables`` (and ``views``) has a new ``--schema`` option which outputs the table/view schema, see :ref:`cli_tables`. (`#104 <https://github.com/simonw/sqlite-utils/issues/104>`__)
|
||||||
|
- Nested structures containing invalid JSON values (e.g. Python bytestrings) are now serialized using ``repr()`` instead of throwing an error. (`#102 <https://github.com/simonw/sqlite-utils/issues/102>`__)
|
||||||
|
|
||||||
.. _v2_7:
|
.. _v2_7:
|
||||||
|
|
||||||
2.7 (2020-04-17)
|
2.7 (2020-04-17)
|
||||||
|
|
|
||||||
10
docs/cli.rst
10
docs/cli.rst
|
|
@ -17,7 +17,7 @@ You can execute a SQL query against a database and get the results back as JSON
|
||||||
[{"id": 1, "age": 4, "name": "Cleo"},
|
[{"id": 1, "age": 4, "name": "Cleo"},
|
||||||
{"id": 2, "age": 2, "name": "Pancakes"}]
|
{"id": 2, "age": 2, "name": "Pancakes"}]
|
||||||
|
|
||||||
This is the default subcommand for ``sqlite-utils``, so you can instead use this::
|
This is the default command for ``sqlite-utils``, so you can instead use this::
|
||||||
|
|
||||||
$ sqlite-utils dogs.db "select * from dogs"
|
$ sqlite-utils dogs.db "select * from dogs"
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ For a full list of table format options, run ``sqlite-utils query --help``.
|
||||||
Returning all rows in a table
|
Returning all rows in a table
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
You can return every row in a specified table using the ``rows`` subcommand::
|
You can return every row in a specified table using the ``rows`` command::
|
||||||
|
|
||||||
$ sqlite-utils rows dogs.db dogs
|
$ sqlite-utils rows dogs.db dogs
|
||||||
[{"id": 1, "age": 4, "name": "Cleo"},
|
[{"id": 1, "age": 4, "name": "Cleo"},
|
||||||
|
|
@ -155,7 +155,7 @@ This command accepts the same output options as ``query`` - so you can pass ``--
|
||||||
Listing tables
|
Listing tables
|
||||||
==============
|
==============
|
||||||
|
|
||||||
You can list the names of tables in a database using the ``tables`` subcommand::
|
You can list the names of tables in a database using the ``tables`` command::
|
||||||
|
|
||||||
$ sqlite-utils tables mydb.db
|
$ sqlite-utils tables mydb.db
|
||||||
[{"table": "dogs"},
|
[{"table": "dogs"},
|
||||||
|
|
@ -202,6 +202,8 @@ Use ``--schema`` to include the schema of each table::
|
||||||
|
|
||||||
The ``--nl``, ``--csv`` and ``--table`` options are all available.
|
The ``--nl``, ``--csv`` and ``--table`` options are all available.
|
||||||
|
|
||||||
|
.. _cli_views:
|
||||||
|
|
||||||
Listing views
|
Listing views
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
|
@ -410,7 +412,7 @@ You can use the ``--not-null`` and ``--default`` options (to both ``insert`` and
|
||||||
Creating indexes
|
Creating indexes
|
||||||
================
|
================
|
||||||
|
|
||||||
You can add an index to an existing table using the ``create-index`` subcommand::
|
You can add an index to an existing table using the ``create-index`` command::
|
||||||
|
|
||||||
$ sqlite-utils create-index mydb.db mytable col1 [col2...]
|
$ sqlite-utils create-index mydb.db mytable col1 [col2...]
|
||||||
|
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
|
||||||
VERSION = "2.7"
|
VERSION = "2.7.1"
|
||||||
|
|
||||||
|
|
||||||
def get_long_description():
|
def get_long_description():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue