ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [ANN] Collecting requirements for Ant2
Date Thu, 22 Mar 2001 23:49:30 GMT
At 03:18  22/3/01 -0800, Alex Smith wrote:
>Peter Donald <> wrote:
>[re: foreach vs select ordering semantics]
>>Well where foreach has been implemented it often does have ordering
>>semantics (as a matter of fact I can't think of a implementation that  
>> >does not have ordering semantics - can you?). However very few decent   
>> >(I can't think of any) implementations of SQL have ordering semantics >at

>>that level (people who know the underlying strategy/structures/db >can 
>>force a particular ordering but that was no inherent in SQL last >time I 
>>read about it).
>All I have to say is that where SELECT has been implemented it often does 
>have ordering semantics too. All databases provide for default ordering 
>where you don't have to specify how to order your result set just as you 
>don't have to say that you want your files from a directory be selected in 
>alphabetical order with foreach. Show me an implementation (database or 
>shell) that doesn't have this and I'll admit I was wrong.

I am not sure what you are saying. Of course results come out in an order
... however the order is determined by implementation rather than
specification (except in a few cases). To get ordering you have to use
ORDER BY or else construct selects in a particular manner. ie many
databases follow these rules that I have noticed but the SQL specification
as far as I know does not mandate it. 

* If select has condition based on primary key then the resultset will be
ordered by primary key
* If select has condition not based on any key then the resultset will be
ordered by the order it was entered in (unless database has optimized
itself between row insert and select)
* joins based on primary keys are ordered by "left" tables PK



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message