>Date: Fri, 05 Jul 2013 02:04:04 +0200 > >From: Olaf Schmidt <n...@vbrichclient.com> >To: sqlite-users@sqlite.org >Subject: Re: [sqlite] Is there a way to return the row number? (NOT >the rowid) >Message-ID: <kr52ig$e71$1...@ger.gmane.org> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Am 03.07.2013 14:50, schrieb Keith Medcalf: >> >>> Given all that, I will NEVER use the pure sql (if I can use any >>> other solution). >> >> given that the "ordinal in the result set" is a fallacious >> concept being created for the convenience of an application > > program which cannot deal with sets properly ... > >Oh, so convenience is now bad suddenly? >[...] >Because there's a lot of things one can use that for - especially >when you consider the concept of disconnected Recordsets, which >can be passed around in an application, or across thread- or >machine-boundaries - generic container-classes, which can be >bound to grids - or used as the datasource for parts in a Report >... in any of those cases such a "directly contained info" can >be useful, when it's already "there in the returned set-object >as a calculated column-value". >[...]
This is utterly fallacious. When you have a result set stored in a data structure, the "row number" is inherent in that structure (whether it is a list, array, or some dotSnot crud which wraps a simple array structure in hugely overcomplicated layers of smega). You always access the first row as entry 0 of the structure. Correspondingly the 47th row can be accessed by indexing into entry 46 of the structure. Encoding the index (ordinal) within the array row data serves no useful purpose whatsoever. Doing so will just come back to bite the wattage -challenged in the ass -- just like datetime values do. If you think you need to encode the index into the data, then you should not be designing databases or applications, you do not have the necessary skills to be doing so. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users