Re: flexi adaption/casting scheme - Mailing list psycopg

From Daniele Varrazzo
Subject Re: flexi adaption/casting scheme
Date
Msg-id CA+mi_8YSEOs0tmwPrqm=B2nUri_Uuamg62KzX0xdoe=ehByBsQ@mail.gmail.com
Whole thread Raw
In response to Re: flexi adaption/casting scheme  (Ronan Dunklau <rdunklau@gmail.com>)
Responses Re: flexi adaption/casting scheme
List psycopg
On Fri, Sep 21, 2012 at 5:42 PM, Ronan Dunklau <rdunklau@gmail.com> wrote:

> I would  be very happy if it is included in a future release.

I've pushed it into my composite-custom branch. I've mixed our
designs, refactoring CompositeCaster to allow overriding make(), but
adding a factory parameter to register_composite() to register the
subclasses the same way the base class is usually created, without the
from_db/register methods exposed in my previous patch.

An example of usage is in the docs: see
https://github.com/dvarrazzo/psycopg/commit/fa9393b5870f07d6fb3ac55f5d90ffd8e06fe678#L1R208

Thank you and Tobias for the input. Testing and comments are welcome.

-- Daniele


psycopg by date:

Previous
From: Tobias Oberstein
Date:
Subject: Re: flexi adaption/casting scheme
Next
From: Tobias Oberstein
Date:
Subject: Re: flexi adaption/casting scheme