Hi All, I am exploring the use of the Virtual Table capability of SQLite 3.5.1 for implementing alternative backing store and have a couple of questions for virtual table gurus:
Say I define a virtual table module registered as "custom" and then define virtual table T as follows: CREATE VIRTUAL TABLE T USING custom ( args ); This results in call to custom.xcreate() which calls sqlite3_declare_vtab() with a second argument of, say: "CREATE TABLE xxx ( a, b, c )". Now the sqlite3 shell meta command, .schema, outputs: CREATE VIRTUAL TABLE T USING custom ( args ); but not: CREATE TABLE xxx ( a, b, c ); How cosmic would it be to extend the .schema command to show both the CREATE VIRTUAL TABLE and corresponding CREATE TABLE statements? This is just a nicety, for debug checking. Secondly, and more important, I was hoping that it would be possible to have CHECK constraints on a virtual table, by saying, for example: "CREATE TABLE xxx ( a, b, c, CHECK( a < 10 ) )" as second argument to sqlite3_declare_vtab(). But it appears that the code generator routine, sqlite3GenerateConstraintChecks((), does not get called for virtual tables. I wonder how cosmic it would be to add a routine, sqlite3GenerateVirtualTableConstraintChecks(), that would generate constraint checking code for virtual tables. Is the current virtual table module interface sufficient to support such a capability? Regards, Mark