I was also looking to do something similar with tabular type data that exists in my application and create "synthetic" Sqlite tables without actually populating the Sqlite database. i.e., I just wanted to leverage the excellent SQL select engine of Sqlite to query the transient data that is already in RAM in my app (typically in large arrays). This would not only save RAM, but increase the overall speed of the program. But after looking at the Btree API, I concluded that making such a "synthetic table" hook was far from trivial. Such logic would have to be put between the VDBE layer and the Btree layer - a major code redesign.
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > On Tue, 2005-09-27 at 09:36 -0600, Brian Roe wrote: > > I'm interested in using SQLite both at the SQL and BTree levels in an > > application. That is, I would like to create tables and be able to run > > queries using SQL while also inserting into, querying and updating > > tables directly via the BTree-level C API calls (thus bypassing the SQL > > subsystem entirely). Is there any information on how I can accomplish > > this without corrupting data, confusing SQLite, etc? > > > > The only documentation is comments in the code. > > Note that the BTree-layer interface is not a published API. > It is subject to change in very incompatible ways without > notice. Such changes may be semantic only - meaning that > after upgrading SQLite you find that your application > compiles and links fine but generates subtle and difficult > to trace errors. The BTree interface is also fragile and > is not designed for external use. It lacks much of the > parameter checking that normally occurs on library routines > since the Btree interface is not intended for that use. > You will find that generating segfaults and corrupting > your database files will be quite easy if you call the > BTree layer directly. For these reasons, calls directly > into the BTree layer are strongly discouraged. > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com