Sure!
Here are the results:
Good:
The 'destructor' function attribute works just as advertised. I
have included below the modified half.so example code from sqlite website
with the 'constructor' and 'destructor' functions (for linux using gcc).
Bad:
The '.q' command on
On Mon, 31 Aug 2009 19:48:48 -0400, sub sk79
subs...@gmail.com wrote:
Here is the new info I got from your replies:
1. sqlite_load_extension is per-db-connection - Oddly I did not see any
explicit reference to this in either of the two places I looked for it:
i)
Hi,
´¯¯¯
2. Following up on windows dllmain info - which was very useful in itself
- but since we use both windows and linux, I checked the equivalent for
linux as well and yes, luckily, gcc allows you to define a 'function
attribute' called 'constructor' and 'destructor' which can be used to
At 18:25 30/08/2009, you wrote:
´¯¯¯
When we load an extension it invokes sqlite3_extension_init(). Lets
say, in
addition to creating functions, the loaded extension library also does
some
internal data structure allocations, initializations etc here.
Now, when the database is closed the
Firstly thanks to both of you for useful replies.
Here is the new info I got from your replies:
1. sqlite_load_extension is per-db-connection - Oddly I did not see any
explicit reference to this in either of the two places I looked for it: i)
Hi,
When we load an extension it invokes sqlite3_extension_init(). Lets say, in
addition to creating functions, the loaded extension library also does some
internal data structure allocations, initializations etc here.
Now, when the database is closed the loaded extension needs to do cleanup.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
sub sk79 wrote:
1. Is it possible to register a callback which is invoked on database
close?
There is a hacky way of finding out when a particular db is closed.
Register a collation with an unused name (eg _AX1) and provide an
xDestroy callback.