--- [EMAIL PROTECTED] wrote:
> OK.  Here is a crazy idea for consideration:
> 
> You know that you can create a custom collating function as a
> DLL or shared library and load it at runtime, right?  This has
> been a capability since version 3.3.7.  Suppose we define a
> special table in the database file that is designed to hold
> DLLs and/or shared libraries.  Perhaps something like this:
> 
>     CREATE TABLE sqlite_shared_libs(
>        architecture TEXT,
>        library BLOB
>     );
> 
> You can put DLLs or shared libraries for any custom collating 
> functions (also any custom SQL functions or virtual table 
> implementations) into this table and SQLite will load them
> automatically which is starts up.  This allows you to create
> any non-standard database extensions you want and make them
> completely portable to any database editor or other tool that
> wants to access the database.

Christian Werner's SQLiteODBC driver does something similar to
your proposal except it compiles C function extensions on the fly
using TCC:

  http://www.mail-archive.com/sqlite-users@sqlite.org/msg21945.html

  http://sqlite.org/contrib/download/sqlite%2Btcc.tar.gz?get=13

The idea could be generalized to run any arbitrary binary and/or
script to make a shared library.

See also the sqlite_extensions proposal at the bottom of this page:

  http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions

It takes into account extension library load/unload order as well 
as the name the names of the function entry points.


      
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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

Reply via email to