mirror of
https://github.com/sprockets/sprockets-postgres.git
synced 2024-11-21 19:28:34 +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 Postgres connection and methods to execute queries.
|
||||
|
||||
|
|
|
@ -3,14 +3,13 @@ Example Web Application
|
|||
The following code provides a simple example for using the
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
import sprockets.http
|
||||
import sprockets_postgres as postgres
|
||||
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``.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue