At this time I do not plan to provide a way to distinguish "INTEGER PRIMARY KEY AUTOINCREMENT" and "INTEGER PRIMARY KEY" for fts3. fts is in the business of doing a fulltext index, not enforcing constraints! If you require that level of operation, the appropriate solution would be to have a parallel table defined the way you want it to be, which is used to generate the rowids for fts. For instance:
CREATE VIRTUAL TABLE x USING fts3; CREATE TABLE y (id INTEGER PRIMARY KEY AUTOINCREMENT); -- ... BEGIN; INSERT INTO y VALUES (null); INSERT INTO x (rowid, content) VALUES (LAST_INSERT_ROWID(), 'Some text'); COMMIT; This is similar to how SQLite creates a sequence generator when you use AUTOINCREMENT. It is likely that I'll expose a docid column, to prevent confusion around how rowid works, I'm still thinking about this. The virtual table interface recently aquired the ability to export HIDDEN columns, which would be useful for exporting such a column. -scott On 8/15/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > --- Adam Megacz <[EMAIL PROTECTED]> wrote: > > Hello, I need to create a perpetually-unique column in an FTS2 table. > > For example: > > > > create virtual table t using fts2(c); > > insert into t (c) values ('a'); > > select rowid,c from t; > > 1|a > > delete from t; > > insert into t (c) values ('b'); > > select rowid,c from t; > > 1|b > > > > How can I get the last query to return some value other than "1" (the > > column need not be called ROWID; any name will work)? > > Presumably fts3 will support a column along the lines of: > > id INTEGER PRIMARY KEY AUTOINCREMENT > > > > > ____________________________________________________________________________________ > Got a little couch potato? > Check out fun summer activities for kids. > http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------