On 6/4/07, Rick Morrison <[EMAIL PROTECTED]> wrote:
> The use of scalar() here seems out of place with both the common CS usage of
> the word (e.g. scalar == single-valued), and the use of scalar() in the SQL
> layer. Single row results in the ORM are rows, not
> a single datatype. It's another potential point of
> confusion, like the ORM .select() is/was.
>
> I would say drop scalar() in the ORM namespace, and for
> single-row results, use
>
> .first() -- returns first row
> .one() -- returns first row, raise exception if more than one result

What if there are zero rows?  Return None or raise an exception?  I
find the former useful enough, but I imagine some people prefer the
latter.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to