Hi, My questions are basically:
1) What causes sqlite3 to call xRowid 2) If I don't want to update my virtual table, or do a select ROWID, can I just use an incremental counter, increased on every call to xNext (bearing in mind the order of my data is not guaranteed, so this won't necessarily return the same rowid for the same row on separate calls to xFilter), or even better just return SQLITE_ERROR? The problem itself is detailed below. Thanks, Kevin --------------------------------------- I am creating virtual table that unpacks the contents of another table/view. As a simple example, consider the following: create table t(week, performance_csv) Where each row contains a csv file for the performance of the given week, and each csv file has two columns, person and percentage. I want to create a virtual table as follows: create virtual table t2 using unpack_performance(t) This table will declare the table as follows create table t2(week, person, percentage) and it will iterate over each row of each csv in the table t. Implementing xRowid is easy because I can base it off the ROWID of t and number of lines in the csv file. However, the problem comes when t is a view, I've only just discovered that views don't have ROWIDs! I can quite happily just increment a simple counter, but the view isn't necessarily ordered, so the rowid won't match on multiple filters. In my actual application the view is the union of a few selects, so actually including the rowid in the view is going to be a complete pain, and is not an option I want to consider. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users