On 7/14/05, Oleg Broytmann <ph...@ph...> wrote:
> On Thu, Jul 14, 2005 at 09:26:53PM +1000, Andrew Bennetts wrote:
> > >
> > > > + if len(results) =3D=3D 0:
> > > > + return None
> > > > + elif len(results) =3D=3D 1:
> > > > + return results[0]
> > > > + else:
> > > > + raise SQLObjectMoreThanOneResultError(
> > > > + "%d rows retrieved by selectOne" % len(results))
> >
> > We can keep it as a specific extension in our code, but I think this us=
eful
> > for more than just us.
>=20
> Well, what people think? Is selectOne() really valuable addition?
Yes, I think it's a nice convenience. For me, most uses of this are
taken care of by the alternateID byFoo methods, but there are still
times when this would be handy.
Kevin
|