diff --git a/docs/faq.rst b/docs/faq.rst index 664e49bd..52e5f9e3 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -34,6 +34,12 @@ class that implements dot-notation via the ``record_class`` argument to :func:`connect() ` or any of the Record-returning methods. +.. code-block:: python + + class MyRecord(asyncpg.Record): + def __getattr__(self, name): + return self[name] + Why can't I use a :ref:`cursor ` outside of a transaction? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~