[Bioperl-l] bioperl-db: posqgresql adaptor
Yves Bastide
Yves.Bastide@irisa.fr
Tue, 19 Nov 2002 19:26:05 +0100
Hilmar Lapp wrote:
> Cool - you must have dug yourself into the code layout - I'm impressed.
Nope--I just copied your code. :)
>
> The exception you mention - can you provide a stack trace for this? It
> sounds more like a general bug to me. Under which circumstances does it
> happen?
This is in BasePersistenceAdaptor::find_by_query, when columns are
bound. In writing the SQL query, some attributes are removed according
to the adaptor's %slot_attribute_map, e.g. in the case of comment:
"Bio::DB::BioSQL::SeqFeatureAdaptor" => undef.
Such removals are written in SQL as the condition "1 = 1". So when it's
time to bind the column, the DBD, expecting "attribute = ?", is confused.
Your code tests if bind_param was successful, with a comment explaining
these cases; but DBD::Pg chooses to raise an exception.
So, in short: Is this a more general bug? Perhaps, conceptually. Does
it deserve a better fix? Nope, don't think so.
>
> I'll incorporate this.
Thanks!
>
> -hilmar
yves
> --
> -------------------------------------------------------------
> Hilmar Lapp email: lapp at gnf.org
> GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
> -------------------------------------------------------------
>
>