Skip to content

Commit

Permalink
Merge branch 'master' into timestamptz_column
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Jan 24, 2021
2 parents 6fde022 + 550f02d commit 18b4a26
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
7 changes: 3 additions & 4 deletions docs/src/piccolo/features/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ For example:
Get the SQL at any time
-----------------------

At any time you can access the __str__ method of a query, to see the
At any time you can access the ``__str__`` method of a query, to see the
underlying SQL - making the ORM feel less magic.

.. code-block:: python
query = Band.select(Band.name).where(Band.popularity >= 100)
print(query)
>>> query = Band.select(Band.name).where(Band.popularity >= 100)
>>> print(query)
'SELECT name from band where popularity > 100'
9 changes: 5 additions & 4 deletions docs/src/piccolo/getting_started/database_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Database Support
================

Postgres is the primary database which Piccolo was designed for.
`Postgres <https://www.postgresql.org/>`_ is the primary database which Piccolo
was designed for.

Limited SQLite support is available, mostly to enable tooling like the
playground. Postgres is the only database we recommend for use in production
with Piccolo.
Limited `SQLite <https://www.sqlite.org/index.html>`_ support is available,
mostly to enable tooling like the :ref:`playground <Playground>`. Postgres is the only database we
recommend for use in production with Piccolo.
3 changes: 2 additions & 1 deletion docs/src/piccolo/getting_started/what_is_piccolo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Some of it's stand out features are:
* A builtin playground, which makes learning a breeze - see :ref:`Playground`.
* Works great with `iPython <https://ipython.org/>`_ and
`VSCode <https://code.visualstudio.com/>`_ - see :ref:`tab_completion`.
* Batteries included - a User model, authentication, migrations, an admin,
* Batteries included - a :ref:`User model and authentication <Authentication>`, :ref:`migrations <migrations>`, an :ref:`admin <ecosystem>`,
and more.
* Templates for creating your own :ref:`ASGI web app <ASGICommand>`.
8 changes: 8 additions & 0 deletions docs/src/piccolo/query_types/create_table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ This creates the table and columns in the database.
>>> Band.create_table().run_sync()
[]
To prevent an error from being raised if the table already exists:

.. code-block:: python
>>> Band.create_table(if_not_exists=True).run_sync()
[]
2 changes: 1 addition & 1 deletion docs/src/piccolo/query_types/django_comparison.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ Database Settings
-----------------

In Django you configure your database in ``settings.py``. With Piccolo, you
definte an ``Engine`` in ``piccolo_conf.py``. See :ref:`Engines`.
define an ``Engine`` in ``piccolo_conf.py``. See :ref:`Engines`.
10 changes: 4 additions & 6 deletions docs/src/piccolo/query_types/select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ One of the most powerful things about select is it's support for joins.

.. code-block:: python
b = Band
b.select(
b.name,
b.manager.name
).run_sync()
>>> b = Band
>>> b.select(b.name, b.manager.name).run_sync()
[{'name': 'Pythonistas', 'manager.name': 'Guido'}, {'name': 'Rustaceans', 'manager.name': 'Graydon'}]
The joins can go several layers deep.
Expand Down Expand Up @@ -163,7 +161,7 @@ To return the data as a JSON string:
Piccolo can use `orjson <https://github.com/ijl/orjson>`_ for JSON serialisation,
which is blazing fast, and can handle most Python types, including dates,
datetimes, and UUIDs. To install Piccolo with orjson support use
`pip install piccolo[orjson]`.
``pip install piccolo[orjson]``.

where
~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/src/piccolo/query_types/transactions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inbetween state.
Atomic
------

This is useful when you want to programitcally add some queries to the
This is useful when you want to programmatically add some queries to the
transaction before running it.

.. code-block:: python
Expand Down

0 comments on commit 18b4a26

Please sign in to comment.