mirror of
https://github.com/sprockets/sprockets-postgres.git
synced 2024-11-14 11:19:27 +00:00
Documentation updates
This commit is contained in:
parent
58d349e790
commit
75b8d49bed
4 changed files with 12 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
PostgresConnector
|
Postgres Connector
|
||||||
=================
|
==================
|
||||||
A :class:`~sprockets_postgres.PostgresConnector` instance contains a cursor for
|
A :class:`~sprockets_postgres.PostgresConnector` instance contains a cursor for
|
||||||
a Postgres connection and methods to execute queries.
|
a Postgres connection and methods to execute queries.
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ The following code provides a simple example for using the
|
||||||
from sprockets.http import app
|
from sprockets.http import app
|
||||||
|
|
||||||
|
|
||||||
class RequestHandler(postgres.RequestHandlerMixin,
|
class RequestHandler(postgres.RequestHandlerMixin, web.RequestHandler):
|
||||||
web.RequestHandler):
|
|
||||||
|
|
||||||
GET_SQL = """\
|
GET_SQL = """\
|
||||||
SELECT foo_id, bar, baz, qux
|
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
|
setup the pool to connect to PostgreSQL and will shutdown the connections
|
||||||
cleanly when the application stops.
|
cleanly when the application stops.
|
||||||
|
|
||||||
|
It should be used in conjunction with ``sprockets.http.app.Application``
|
||||||
|
and not directly with ``tornado.web.Application``.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,15 @@ in :class:`Tornado <tornado.web.Application>` /
|
||||||
:class:`sprockets.http <sprockets.http.app.Application>` applications using
|
:class:`sprockets.http <sprockets.http.app.Application>` applications using
|
||||||
:py:mod:`aiopg`.
|
:py:mod:`aiopg`.
|
||||||
|
|
||||||
|
Python versions supported: 3.7+
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
``sprockets-postgres`` is available on the Python package index and is installable via pip:
|
``sprockets-postgres`` is available on the Python package index and is installable via pip:
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
pip install sprockets-postgres
|
pip3 install sprockets-postgres
|
||||||
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
QueryResult
|
Query Result
|
||||||
===========
|
============
|
||||||
A :class:`~sprockets_postgres.QueryResult` instance is created for every query
|
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
|
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
|
a :class:`dict` or ``rows`` as a list of :class:`dict`. For queries that do
|
||||||
|
|
Loading…
Reference in a new issue