From fcaef1246681f76176ca6d449c35056809d6c525 Mon Sep 17 00:00:00 2001 From: Matt Yule-Bennett Date: Sat, 24 Feb 2018 13:22:48 +0000 Subject: [PATCH] More formatting fixes --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index d16d8b4..57ca86e 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ nameko-sqlalchemy ================= -DependencyProviders and utilities for `nameko `_services to interface with a relational database using SQLAlchemy. +DependencyProviders and utilities for `nameko `_ services to interface with a relational database using SQLAlchemy. Usage @@ -30,7 +30,7 @@ Usage ... -The `nameko_sqlalchemy.Database` DependencyProvider can be used in three ways: +The ``nameko_sqlalchemy.Database`` DependencyProvider can be used in three ways: As a context manager that issues a commit or rollback on exit: @@ -68,7 +68,7 @@ To manage a session that is lazily opened on first use and closed when the Namek self.db.session.commit() -The `nameko_sqlalchemy.DatabaseSession` DependencyProvider maintains the original interface from the early versions of the library. It behaves similarly to the third example above, except that the session is opened before the entrypoint fires, rather than lazily. +The ``nameko_sqlalchemy.DatabaseSession`` DependencyProvider maintains the original interface from the early versions of the library. It behaves similarly to the third example above, except that the session is opened before the entrypoint fires, rather than lazily. .. code-block:: python @@ -171,6 +171,7 @@ or using with the ``Database`` dependency provider self.db.session.commit() .. caution:: + Using the decorator may cause unanticipated consequences when the decorated function uses more than one transaction. It should only be used around single transactions because all transactions inside the decorator will be re-executed if there is a connection error during any of them. Take a look at the following example: