Re: Map connection().status() to name?

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: Map connection().status() to name?
Дата
Msg-id CA+mi_8aAj9Af-UBLwuqnueX4xkx3KsSiLzDUvbw9Es_LHLDoBw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Map connection().status() to name?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Map connection().status() to name?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список psycopg
On Fri, Nov 18, 2016 at 8:47 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 11/11/16 2:14 PM, Jim Nasby wrote:
>>
>> I realize that there are constants in psycopg2.extensions for available
>> connection statuses and what-not, but is there any included way to map a
>> returned status to a descriptive string? When I'm trying to debug
>> something a status of '2' doesn't really tell me anything useful. :(
>
>
> Would a patch implementing such a map be accepted?

I don't see why not. What constant do you want to reverse? The groups
in `extensions` are status, isolation level, transaction status. Would
you provide 3 different functions to reverse them?

-- Daniele


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Map connection().status() to name?
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Map connection().status() to name?