Re: [psycopg] Nested transactions support for code composability

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: [psycopg] Nested transactions support for code composability
Дата
Msg-id 2C0DAD9D-A5AF-4E66-9A79-6DD5C49F7657@thebuild.com
обсуждение исходный текст
Ответ на [psycopg] Nested transactions support for code composability  (Daniel Fortunov <psycopg-list@danielfortunov.com>)
Ответы Re: [psycopg] Nested transactions support for code composability
Список psycopg
> On Jan 16, 2017, at 15:26, Daniel Fortunov <psycopg-list@danielfortunov.com> wrote:
>
> I'd like to implement support for nested transactions in psycopg2 using a context manager that internally uses
postgressavepoints to implement the ability to nest transactions within each other, with sensible commit and rollback
semantics.

You can see two existing examples of this, based on Django.  Django implements the @atomic() decorator, which was based
onmy @xact() decorator: 

    https://github.com/Xof/xact

They can almost certainly be eased out of the Django infrastructure easily enough!

--
-- Christophe Pettus
   xof@thebuild.com



В списке psycopg по дате отправления:

Предыдущее
От: Daniel Fortunov
Дата:
Сообщение: [psycopg] Nested transactions support for code composability
Следующее
От: Wes McKinney
Дата:
Сообщение: Re: [psycopg] Turbo ODBC