Am 06.07.2013 19:25, schrieb Keith Medcalf:
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.

No, it isn't - instead your reply is immature (may I ask, how old
you are)?

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).

Tell me news...

You always access the first row as entry 0 of the structure.

Oh, do I?
I'd say, your index 0 is only one of the possible lower-bound-values,
a data-constainer-structure can be accessed with (depending on the
implementation of that container - or its settings)...

But I'm glad, you discovered already lists and arrays... well -
I can ensure you, that there's "much more out there" (not only
the "dotSnot crud", you so far successfully avoided, I'm sure).

>   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.

Glad you brought that up - but again your leap is not far enough,
because there's sorting ...
Sorting, some of the more advanced Container-structures (you're
aware, that I'm not talking about Lists Or Arrays anymore, do you?)
will support "at the clientside" (no DB-connection, no SQL-engine
in sight there) - some of them in a pretty advanced way, allowing
basically the same (multi-column) functionality as the SQL
Order By Clause.

How would your "inherent index" behave now - or better: "how would
you *like* it to behave"? (after a Sorting took place - and you're
about to re-render your Grid- or Report-Content).

What, if you indeed want it, to be treated (by the client-app)
as a sort of "initial ranking" (because in the resultset, the
original Sort-Columns or criteria, which led to that "simple
ranking" are not contained)?


Doing so will just come back to bite the wattage - challenged in
the ass -- just like datetime values do.

I'm very sorry, but the above sentence does not make any sense
to me (in the given context, and given what you said earlier).

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.


Now, *that* I understand better - but you don't seem to read
carefully enough (this may explain your somewhat rude tone -
well, I always try to allow for a certain degree of "youthful
arrogance" - but seriously, this is just an utterly idiotic
statement to made there.

It's about a "pure-convenience-feature" in an already nice
OpenSource-lib, ... which has still a pretty small footprint -
but the feature is really cheap to implement, not adding much
to the codebase.

Nothing more - no attacks on OpenSource-ideals, no attacks with
regards to "undermining relational rules in db-design" - the
feature is entirely in the category of e.g. the Round()-function -
a pure convenience-thingy, to "pretty up resulting views
already at the SQL-level" (and yes, I'm aware, that Round() can
be used in other scenarios too, but that's its main-purpose).

Olaf


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to