System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: bc7dc46b0be80319e9789693b06577880f22ac89
Title: DeclareTable returning "not and error" for WITHOUT ROWID virtual tables
Status: Deferred Type: Feature_Request
Severity: Important Priority: Medium
Subsystem: Virtual_Table Resolution: Under_Review
Last Modified: 2017-06-09 22:38:56
Version Found In: 1.0.105.1
User Comments:
anonymous added on 2017-06-07 06:17:48:

I'm creating a module for a virtual table in SQLite and it is working fine. Great work, guys!

However, now I need to add a virtual table for which I can't map a ROWID. And I'm getting a "not an error" from DeclareTable.

This declaration works fine:

"CREATE TABLE x(AlbumId integer NOT NULL,Title nvarchar NOT NULL,ArtistId integer NOT NULL)"

But all the following ones fails with a "not an error" error (I tried them all):

"CREATE TABLE x(AlbumId integer NOT NULL,Title nvarchar NOT NULL,ArtistId integer NOT NULL,PRIMARY KEY (AlbumId)) WITHOUT ROWID"

"CREATE TABLE x(AlbumId integer NOT NULL PRIMARY KEY,Title nvarchar NOT NULL,ArtistId integer NOT NULL) WITHOUT ROWID"

"CREATE TABLE x(AlbumId integer PRIMARY KEY,Title nvarchar NOT NULL,ArtistId integer NOT NULL) WITHOUT ROWID"

I suspect the problem could be that the module is always declared with the xUpdate method (Section 2.1.13 from https://sqlite.org/vtab.html -- "the xUpdate method must be NULL for a WITHOUT ROWID virtual table"). But I can't find any way to change this.

Is this a bug? There is a way to declare a module in System.Data.SQLite without the xUpdate method? I'm doing something wrong in my declaration?


mistachkin added on 2017-06-09 22:29:27:
The WITHOUT ROWID feature was added to the SQLite core library after this class
was added to System.Data.SQLite and is not yet supported by the virtual table
subsystem of System.Data.SQLite.