On Mon, 31 Jan 2011 08:44:22 -0500, Simon Slavin <[email protected]>
wrote:
> On 31 Jan 2011, at 1:24pm, Samuel Adam wrote:
[snip]
>> Actually since this is an FTS3 table, the form with the quotes is the
>> correct one. As Mr. da Silveira alluded later in his post, in FTS3, the
>> row ID and only the row ID is an INTEGER
>
> But from his CREATE command, isn't the column called 'id' an alias to
> the rowid ?
FTS3 docs do not mention "id", as I quoted. Moreover, "id" is *not*
normally an alias for rowid:
sqlite> CREATE TABLE "Test" ("id" TEXT);
sqlite> INSERT INTO "Test" ("id") VALUES ('This is a test.');
sqlite> SELECT typeof("id") FROM "Test";
text
sqlite> CREATE TABLE "Test2" ("" TEXT);
sqlite> INSERT INTO "Test2" VALUES ('There should be no column named "id"
in thi
s table.');
sqlite> SELECT "rowid", "id", "" FROM "Test2";
1|id|There should be no column named "id" in this table.
(That last happens because SQLite helpfully reinterprets the double-quoted
non-identifier as a string value.)
> But what I did miss is that these are VIRTUAL tables, not real ones.
> And therefore you cannot test the contents of the table by opening the
> database with the command-line tool.
I forgot: I always compile my sqlite3 shell with FTS3, &c. It is easy
from the amalgamation: Just set defs correctly, compile sqlite3.c and
shell.c, and link. A configure script is not needed.
> Would it be possible to temporarily remove the word 'VIRTUAL' from the
> CREATE command ? Would the rest of the application stop working ? If
> this does work, then the contents of the table can be tested as I
> outlined earlier.
Well, then, FTS3 would no longer work; and any tests thereupon would be
irrelevant to actual usage by the original poster.
Samuel Adam <[email protected]>
763 Montgomery Road
Hillsborough, NJ 08844-1304 • United States
http://certifound.com/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users