Am 17.06.2013, 08:58 Uhr, schrieb Chris Withers <[email protected]>:

Hi All,
I seems to commonly need to do a query which should return zero or one mapped objects.

 .one() isn't what I want as no returned object is ok.
.first() isn't what I want as if my query would return more than one object, I have the query wrong and so want an exception.

.count() would seem to be your friend here, at least in case that a lot of rows might be returned.

 Is there something already available that meets this need?

Only if you can express that need as a query.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to