I sounds like you are trying to 'bind' your column buffers once for the statement, sort of like we do with, say ODBC. (and sort of like we do in sqlite for parameters). To wit there is not a means of doing that, but are you sure these column calls are costly? If you really wanted to experiment with it, maybe look in the implementation of the various sqlite_column_xxx functions to see how they get their data out of the record's in-page image, since you'd be ostensibly doing the same. I suspect this will be not as much fun as you would like, because there's datatype conversion and whatnot, rather than simply fetching a pointer to the record image in memory. But it will be intersting to hear back what you find out, and if there is any performance gain to be had from a bound buffer approach.
If you really want to bind for implementationally stylistic reasons, and considering that sqlite_column functions 'do things' beyond returning a pointer to the place in the image, maybe you can make your own binding object that holds a pointer to your bound buffer, and knows the correct type (maybe via template specializations?), and has a virtual method (say, 'transfer())to call the right sqlite_column functions by type. Then your record binding would be a vector of those, and you could wrap sqlite_step() to additionally invoke all transfer() methods. Have fun hacking! -dave > -----Original Message----- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Prakash > Premkumar > Sent: Monday, September 22, 2014 11:29 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Expose struct Mem and struct Vdbe to > other application > > > Thanks a lot for your reply Hick. > I'm trying to split the results of joins. I have one struct > per table and > if I am joining 3 tables, I would like to fill the objects of the > respective structs with the values from the ResultSet in Vdbe > pResultSet > and I want to do it before the callback(interface for the external > applications) is called > Is there are a way , other than using the sqlite_column_ > functions, since I > have to make one function call per column, it is very costly. > Can I not expose the Vdbe and Mem structs by placing it in > sqlite3.h file > like struct sqlite3,which is exposed that way ? > > Thanks > Prakash > > On Mon, Sep 22, 2014 at 8:38 PM, Hick Gunter <h...@scigames.at> wrote: > > > Use the sqlite3_column_ functions to return result fields... > > > > Or you need to use the non-amalgamation sources and > integrate them into > > your build environment. Such use is probably strongly > discouraged by SQLite > > developers, as the internal structures are subject to change without > > notice. Also, a given VDBE Program implements EXACTLY the > SQL query it was > > prepared with and works only with EXACTLY the schema it was prepared > > against. > > > > Are you trying to implement "stored procedures"? > > > > -----Ursprüngliche Nachricht----- > > Von: Prakash Premkumar [mailto:prakash.p...@gmail.com] > > Gesendet: Montag, 22. September 2014 15:37 > > An: General Discussion of SQLite Database > > Betreff: [sqlite] Expose struct Mem and struct Vdbe to > other application > > > > Hi, > > > > Let's assume I am writing a c code which directly invokes > the sqlite_step > > statement. > > After the execution of the statement, I would like to access the > > pResultRow of Vdbe (which obtained by pVbe = (Vdbe*) pStmt ). > > > > How can I expose the struct Vdbe,Mem and the likes to external > > applications. > > Including them in the header file gave me the error > "incomplete defintion > > of struct" > > > > Can you kindly help me? > > > > Thanks > > Prakash > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > ___________________________________________ > > Gunter Hick > > Software Engineer > > Scientific Games International GmbH > > FN 157284 a, HG Wien > > Klitschgasse 2-4, A-1130 Vienna, Austria > > Tel: +43 1 80100 0 > > E-Mail: h...@scigames.at > > > > This communication (including any attachments) is intended > for the use of > > the intended recipient(s) only and may contain information that is > > confidential, privileged or legally protected. Any > unauthorized use or > > dissemination of this communication is strictly prohibited. > If you have > > received this communication in error, please immediately > notify the sender > > by return e-mail message and delete all copies of the original > > communication. Thank you for your cooperation. > > > > > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users