Load Sqlite Extension in Mozilla
Since the version 3.3.6, SQLITE has the capability to load new SQL functions and collating sequences from shared libraries and DLLs. For security considerations, the entire extension loading mechanism is turned off by default and it's the case in Mozilla. This mechanism is accessible through 3 differents methods :
- from the shell : .load filename entrypoint
- from SQL : SELECT load_extension(filename, entrypoint);
- from C : int sqlite3_load_extension(sqlite3 *db, const char *filename, const char *entrypoint, const char *errormessage);
To enable the extension mechanism, you first have to invoke a C function : int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
With this capability, we will have the capability to use new type data, like GEOMETRY, new indexing, like R-Tree, and new treatment directly in SQL statement. This could be usefull with asynchronous statement execution and SQLite XUL template.
This function is waiting from review, but I already tests it and uses it. Stay tuned!