| Issue 80: | tolog count() should be able to count zero | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
The query select count($T) from instance-of($T, op:Person)? produces nothing if there are no persons (not even zero). This causes code assuming there is a result to crash. It's possible to code around this defensively, but there seems to be no reason to force people to do it. Instead, count() should just produce zero if there are no results. |
||||||||||||||
,
Jul 21, 2009
This is how SQL behaves:
topicmaps=> select count(*) from tm_association where 1 = 2;
count
-------
0
(1 row)
|
|||||||||||||||
,
Aug 04, 2009
i committed a fix for this issue, see r385: if the select clause only contains counted variables, and the query does not match anything, the result set contains a row with all zeros instead of an empty result set. |
|||||||||||||||
,
Aug 13, 2009
Fixed by revision 385.
Status: Verified
|
|||||||||||||||
,
Sep 01, 2009
(No comment was entered for this change.)
Labels: Release5.0.1
|
|||||||||||||||
|
|
|||||||||||||||