Documentation updates

This commit is contained in:
Gavin M. Roy 2020-04-08 18:22:24 -04:00
parent 58d349e790
commit 75b8d49bed
4 changed files with 12 additions and 8 deletions

View file

@ -1,5 +1,5 @@
PostgresConnector
=================
Postgres Connector
==================
A :class:`~sprockets_postgres.PostgresConnector` instance contains a cursor for
a Postgres connection and methods to execute queries.

View file

@ -9,8 +9,7 @@ The following code provides a simple example for using the
from sprockets.http import app
class RequestHandler(postgres.RequestHandlerMixin,
web.RequestHandler):
class RequestHandler(postgres.RequestHandlerMixin, web.RequestHandler):
GET_SQL = """\
SELECT foo_id, bar, baz, qux
@ -29,6 +28,9 @@ The following code provides a simple example for using the
setup the pool to connect to PostgreSQL and will shutdown the connections
cleanly when the application stops.
It should be used in conjunction with ``sprockets.http.app.Application``
and not directly with ``tornado.web.Application``.
"""

View file

@ -5,13 +5,15 @@ in :class:`Tornado <tornado.web.Application>` /
:class:`sprockets.http <sprockets.http.app.Application>` applications using
:py:mod:`aiopg`.
Python versions supported: 3.7+
Installation
------------
``sprockets-postgres`` is available on the Python package index and is installable via pip:
.. code:: bash
pip install sprockets-postgres
pip3 install sprockets-postgres
Documentation

View file

@ -1,5 +1,5 @@
QueryResult
===========
Query Result
============
A :class:`~sprockets_postgres.QueryResult` instance is created for every query
and contains the count of rows effected by the query and either the ``row`` as
a :class:`dict` or ``rows`` as a list of :class:`dict`. For queries that do