Cannot step through asynchronous iterator manually
Michael Torrie
torriem at gmail.com
Sat Jan 30 14:42:39 EST 2016
On 01/30/2016 01:22 AM, Frank Millman wrote:
> There are times when I want to execute a SELECT statement, and test for
> three possibilities -
> - if no rows are returned, the object does not exist
> - if one row is returned, the object does exist
> - if more that one row is returned, raise an exception
Is there a reason you cannot get SQL to answer this question for you?
Something like:
SELECT count(some_field) WHERE condition
That will always return one row, with one field that will either be 0,
1, or more than 1.
More information about the Python-list
mailing list