On 18 Nov 2009, at 6:05pm, Roger Binns wrote:

> Tim Romano wrote:
>> This would be a convenient function to have. Are there technical 
>> issues/obstacles?
> 
> In general for all these feature requests for more functions there is no
> need for them to be added to the SQLite core.  There is a very simple API
> and extension mechanism whereby you can add your own functions that do
> exactly what you want.

I googled, and there doesn't seem to be a page which describes the abilities 
and limitations the extension system has.  I'd like to check, then, with 
someone who understands how to write extensions.

(A) Is it possible to define a new datatypen ?  If the data itself was really 
stored in a BLOB, that would be okay, but I wouldn't want my users to know 
that, I'd want them to use this new datatype when they created columns.

(B) If not, then if I needed to store some additional information for every 
TEXT field, could I do that ?  If it was necessary to store it in a different 
table in the same database, e.g. to define a new table with

tablename       fieldname       rowid   columnname      language

that would be acceptable though very slow, but can an extension do that sort of 
thing ?  And can a routine of an extension be automatically called whenever any 
row, column or table in the database is created/deleted ?

(C) Is it possible to put a note inside a database file so that if a database 
was opened without a particular extension being loaded, an error would occur ?  
For example a SQLITE error code, with error text something like "This database 
cannot be used without version 1.1 or higher of the extension 'complex numbers' 
being loaded." ?

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to