[yunqa.de] Re: Support for load_extension() function in SQLiteSpy

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Thu, 24 Feb 2011 20:29:20 +0100

On 24.02.2011 14:16, Tobias Rapp wrote:

> just stumbled over the load_extension() SQL function on the SQLite 
> website. A quick tests shows that this function is not supported by 
> the latest SQLiteSpy application version.

Correct, SQLiteSpy does not include the load_extension() SQL function.

This is because SQLiteSpy uses DISQLite3 as its database engine and
DISQLite3 uses Delphi's default "fastcall" calling convention instead of
C's "cdecl". "fastcall" passes parameters in registers and is usually
faster than "cdecl". Unfortunately, "fastcall" is incompatible with
existing SQLite extensions already written in C. To avoid all confusion,
I exclude loadable extensions from DISQLite3 and SQLiteSpy.

> Do you plan to add support for load_extension() to SQLiteSpy?

For DISQLite3, extensions are not really needed because all code
compiles right into the executable anyway.

> It would be nice to use it for helper functions when debugging the 
> database content of applications using DISQLite3 (e.g. convert
> custom flag interger columns to strings).

I can see how SQLiteSpy would indeed benefit from extensions. But as you
are the first to ask for it, I doubt that they are in high demand.

Therefore I am not sure if this justifies the amount of work to
implement and maintain loadable extensions for DISQLite3. All SQLite
core functions must be wrapped by a "cdecl" to "fastcall" translation
wrapper.

Is this worth the effort? What do others think?

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: