Re: [sqlite] join metadata in query results

2008-01-02 Thread Kees Nuyt
On Wed, 2 Jan 2008 17:49:36 -0600, "Jay Sprenkle" <[EMAIL PROTECTED]> wrote: >On Jan 2, 2008 5:31 AM, Kees Nuyt <[EMAIL PROTECTED]> wrote: > >I found a solution that seems workable. I ended up rewriting my query >class so it assumes a bunch of things which are valid for my application >(but not fo

Re: [sqlite] join metadata in query results

2008-01-02 Thread Jay Sprenkle
On Jan 2, 2008 5:31 AM, Kees Nuyt <[EMAIL PROTECTED]> wrote: > >If the engine within sqlite recorded the row id as it > >fetched each column it would be trivial and would > >prevent me from having to query the database again. > >If it's not present in the current code I found a solution that seems

Re: [sqlite] join metadata in query results

2008-01-02 Thread Kees Nuyt
On Tue, 1 Jan 2008 18:56:25 -0600, "Jay Sprenkle" <[EMAIL PROTECTED]> wrote: >> I fail to see why you can't simply include the PRIMARY KEY >> (portable) or ROWID (not portable) in your SELECT statement if >> you apparently need them later. > >I could, but that would involve changing a lot of exist

Re: [sqlite] join metadata in query results

2008-01-01 Thread Jay Sprenkle
> I fail to see why you can't simply include the PRIMARY KEY > (portable) or ROWID (not portable) in your SELECT statement if > you apparently need them later. I could, but that would involve changing a lot of existing code. If there was a way to get the row id of each column in the result set the

Re: [sqlite] join metadata in query results

2008-01-01 Thread Kees Nuyt
On Tue, 1 Jan 2008 17:16:45 -0600, "Jay Sprenkle" <[EMAIL PROTECTED]> wrote: >Almost. If the join isn't done using the primary key then knowing the >primary key isn't helpful. You told us you needed that information to know which row and column to update (edit). You already know the column. To id

Re: [sqlite] join metadata in query results

2008-01-01 Thread Jay Sprenkle
On Jan 1, 2008 4:58 PM, Kees Nuyt <[EMAIL PROTECTED]> wrote: > You know the query, and also the schema, for example from > PRAGMA table_info(tabelname); > That includes primary key info. > Merge that with the info from the resultset and you know what > you need to know, don't you? Almost.

Re: [sqlite] join metadata in query results

2008-01-01 Thread Kees Nuyt
On Tue, 1 Jan 2008 16:40:21 -0600, "Jay Sprenkle" <[EMAIL PROTECTED]> wrote: >> >If they try to edit a column from the Role table how do I get to Role.Id? >> >If I can get Sqlite to tell me what it used to select the row in the result >> >set >> >it would be much easier that the alternatives. >>

Re: [sqlite] join metadata in query results

2008-01-01 Thread Jay Sprenkle
> >If they try to edit a column from the Role table how do I get to Role.Id? > >If I can get Sqlite to tell me what it used to select the row in the result > >set > >it would be much easier that the alternatives. > > You can always query the ROWIDs (as long as there is no GROUP > BY), with somethi

Re: [sqlite] join metadata in query results

2008-01-01 Thread Kees Nuyt
On Tue, 1 Jan 2008 15:53:05 -0600, "Jay Sprenkle" <[EMAIL PROTECTED]> wrote: >Good afternoon all, > >I'm working on a project using Sqlite. I'm using a query to fill a >table presented to the user. >I'd like to be able to edit the data cell by cell. I can easily call >the column metadata >function

[sqlite] join metadata in query results

2008-01-01 Thread Jay Sprenkle
Good afternoon all, I'm working on a project using Sqlite. I'm using a query to fill a table presented to the user. I'd like to be able to edit the data cell by cell. I can easily call the column metadata functions and get the database, table, and column where that data came from. If I want to upd