[Lazarus] Support for SQLite virtual table?

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Tue Dec 18 10:09:32 CET 2012



On Tue, 18 Dec 2012, Krzysztof wrote:

> Hi,
>
> Reffering to this article:
> http://www.sqlite.org/vtab.html
>
> ... I'm trying to create virtual table. But before call standard CREATE
> VIRTUAL TABLE, some module must be created first. FPC has
> method sqlite3_create_module() but it return 0:
>
> var
>  m: sqlite3_module;
>  c: cint;
> begin
>  FillByte(m, SizeOf(m),0);
>  c := sqlite3_create_module(dsContacts.SqliteHandle, 'test_module', @m,
> nil);
>
> SqliteHandle is assigned. But type sqlite3_module looks strange. It is
> dummy, without fields. Can I somehow create dummy module with pure SQL
> syntax? I don't need stuff to which the module is used.

A virtual table means you will handle storage. 
So I think you must always implement all methods required to handle that ?

That said: probably, the module struct was not implemented because h2pas
encountered an error when translating the headers. This needs to be fixed,
please enter a bug report.

Michael.




More information about the Lazarus mailing list