On Friday, December 24, 2004, at 01:29AM, Will Leshner <[EMAIL PROTECTED]> 
wrote:

>On Thu, 23 Dec 2004 19:08:05 -0500, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
>
>>     (3)  This would be a huge change that would require
>>          a lot of code.  Isn't it easier just to add
>>          "rowid," in from of the "*" in your query?
>>          How hard is it really to write a routine that
>>          adds the appropriate "rowid," in the middle
>>          of a user-supplied query?  100 lines of code
>>          maybe?  Wouldn't that be a better approach?
>
>This does seem like a good approach. I think the thing that always
>concerned me about it was that, although the FROM line would probably
>be trivially to parse in most situations, I could imagine things
>getting pretty complex in some queries and I would be worried that I
>might miss parse it in certain situations. This, of course, is mostly
>a problem for people writing wrappers around SQLite, where the end
>user is using the API defined in the wrapper. If I'm using SQLite
>directly, there is no problem.

I agree. SQLite wrappers should expose the ROWID, which is not that difficult. 
I do not know if it still applies to version 3, but if I recall correctly, in 
version 2 you could only access the ROWID if it had been declared in the CREATE 
TABLE statement. Otherwise, although the column would still be created, a 
'SELECT * FROM xxx' would not return the ROWID column.

-- Tito

Reply via email to