Heh.  Didn't think about precompiled queries at all.  Have to look into
that.  The description you give is what I am already writing to handle
it from the C++ side, so it looks like I'm half-way there .

Thanks for the help.

--Keith

-----Original Message-----
From: Dennis Cote [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 18, 2004 11:29 AM
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] Rowid in VIEWs?


Keith Herold wrote:
> The short question:  do (temporary) VIEW's have rowid's in SQLITE?

The short answer: no.

You don't say how you are accessing the database, but if you are using
C, then you can simply use the precompiled query interface to perform
your lookup and return your result in small blocks.

You will need a getdata function that takes a query and returns up to N
results. The first time the function is called it can compile the query
and save a pointer to the vm produced. Then it steps the vm until it has
retreived N results or the vm is done. If the vm is done it can finalize
the vm and clear the vm pointer. In either case it returns the results
it retrieved.

This will let you get results in small blocks but only perform your
complex query once.

I hope this helps.

Reply via email to