John very eloquently stated. I completely agree with you regarding the 
ant-bloatware philosophy.

OK, I found the answer:

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


Which I'll be trying shortly!




John Stanton <[EMAIL PROTECTED]> wrote: The Sqlite API is set at a low level 
for very sound reasons.  It is 
suitable for incorporating Sqlite into other software such as TCL, Perl, 
Javascript etc or to build an API for specific embedded applications. 
If higher level features are embedded in the core Sqlite it becomes 
bloated with components unused by most applications.

Sqlite's anti-bloatware philosophy is one of its most endearing 
qualities.  It is not easy to retain simplicity.  It reminds me of a 
quotation from ones of Pascal's famous letters "I apologize for making 
this letter so long.  I have not had time to make it shorter".

If you really are concerned with making custom functions available 
without wrappers you can compile them into the Sqlite library alongside 
the predefined functions.  Sqlite lets you do that very simply.

We use a fairly extensive library of custom functions, including ones 
which implement Javascript as an embedded scripting language and another 
set which implements a fixed point decimal number type.  A wrapper 
around sqlite3_open loads them and performs other activities necessary 
to cleanly integrate Sqlite into the applications.  Sqlite upgrades are 
consequently straightforward.

Ken wrote:
> John, 
> 
> Kind of defeats the point of "automatic". 
>  
> Using a wrapper for application code is perfectly legitimate. However it does 
> not address the sqlite3 command line tool.
> 
> The ability to automatically load a library of functions via a dll would be a 
> really nice feature and could be used to promote user contributions for 
> library development for sqlite. 
> 
> For example math function library, or string function library, even the VFS 
> i/o routines could be loaded in this manner. 
> 
> Ken
> 
> John Stanton  wrote: Ken wrote:
> 
>>Is there a way for SQLITE to automatically load user defined functions at 
>>database instantiation or upon database connection? 
>>   
>>    Can it test for a .so/.dll and perform a call to load user functions? If 
>> the .dll does not exist maybe issue a warning? 
>>
>>Just a thought as a way to allow users to create their own  presentation 
>>library to implement things like math functions/ presentation functions etc 
>>without having to make and maintain code changes to the core software.
>>
> 
> 
> Build your own wrapper for the sqlite3_open API function.  You can have 
> some form of library of user defined functions which you bind just after 
> you have made a DB connection.
> 
> 
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
> 
> 
> 


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


Reply via email to