Re: little_pger.py (a thin layer a tad above SQL and psycopg2)

Поиск
Список
Период
Сортировка
От A.M.
Тема Re: little_pger.py (a thin layer a tad above SQL and psycopg2)
Дата
Msg-id 22582753-B809-47DC-8754-6958C519AB29@themactionfaction.com
обсуждение исходный текст
Ответ на Re: little_pger.py (a thin layer a tad above SQL and psycopg2)  (Rory Campbell-Lange <rory@campbell-lange.net>)
Ответы Re: little_pger.py (a thin layer a tad above SQL and psycopg2)  (Rory Campbell-Lange <rory@campbell-lange.net>)
Список psycopg
On Dec 19, 2012, at 11:53 AM, Rory Campbell-Lange wrote:

> On 19/12/12, A.M. (agentm@themactionfaction.com) wrote:
>> ...I, too, have been looking for something lightweight and quick which
>> would allow nearly-automatic JSON generation from database rows. The
>> trickier part is recursing a model attribute tree which always leads
>> me back to SQLAlchemy.
>
> Since psycopg can return namedtuples and simplejson serialises
> namedtuples, this should not be a difficult thing to do.


That doesn't help when there are columns or subselects which need to become part of a one-to-many or many-to-many
relationshiprepresented as arrays attached to the main model in JSON. That is what I meant by "recursing the model
attributetree". 

Cheers,
M





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

Предыдущее
От: Rory Campbell-Lange
Дата:
Сообщение: Re: little_pger.py (a thin layer a tad above SQL and psycopg2)
Следующее
От: Rory Campbell-Lange
Дата:
Сообщение: Re: little_pger.py (a thin layer a tad above SQL and psycopg2)