mercredi 22 juillet 2015

SQLite3 Virtual Tables and Not Null

I appear to be having a problem with Virtual Tables in SQLite3.

Create Tables:

CREATE TABLE Test1 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Value TEXT);
CREATE VIRTUAL TABLE Test2 USING fts4 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Value TEXT);

As you can see they are essentially identical except one is Virtual for FTS4 support.

INSERT INTO Test1 (Value) values("test");
INSERT INTO Test2 (Value) values("test");

Results for Test1:

id          Value     

---------- ----------

1           test 

Results for Test2:

id          Value     

---------- ----------

            test

Is there a way to get SQLite3 to force the NOT NULL characteristic for Virtual Tables?

Thanks!

Aucun commentaire:

Enregistrer un commentaire