On Mon, 2007-06-25 at 17:08 -0500, Andrew Finkenstadt wrote:
> How easy would it be for me to implement a "pragma page_count;" statement
> which returns the CURRENT page count of the database, and is much more
> cross-platform than my attempt to just "check the file size".

Not difficult I would think. You will need to add a case
to the big "if ... else" statement in pragma.c. Search for
the string "page_size" in pragma.c, your new pragma 
implementation will be similar to this.

Use sqlite3BtreePager() to get the pager pointer from the
btree. Then sqlite3PagerPagecount() to get the actual number
of pages. returnSingleInt() to return the data.

Compile, test, debug....

Dan.



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to