Skip to content

Commit

Permalink
Documentation for create_view()
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Willison committed Aug 2, 2018
1 parent a86c3ee commit 19e1057
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ You can also specify a primary key by passing the ``pk=`` parameter to the ``.in
"is_good_dog": True,
}, pk="id")
Creating views
==============

The ``.create_view()`` method on the database class can be used to create a view:

.. code-block:: python
db.create_view("good_dogs", """
select * from dogs where is_good_dog = 1
""")
Storing JSON
============

Expand Down

0 comments on commit 19e1057

Please sign in to comment.