On Jun 20, 9:41 pm, Michael Bayer <[email protected]> wrote:
> its for a
> scalar:http://www.sqlalchemy.org/docs/reference/orm/query.html?highlight=que...
I had read that, but it was unclear.
Initially I thought that "scalar" meant a single column. ie:
values(foo.bar) = ((17,),(18,)) ; while value(foo.bar) = (17,18)
Then I thought "scalar" might mean the sqlalchemy.orm definition on
that page... """Return the first element of the first result or None
if no rows present.""" however , that definition further states """If
multiple rows are returned, raises MultipleResultsFound""" -- and no
error was raised.
looking at the actual module, the code is :
def value(self, column):
try:
return self.values(column).next()[0]
which is to "Return the first item from the values"
could i suggest that the docstrings be changed to better describe this
behavior ?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.