Hi all, I have two tables:
CREATE TABLE data (id INTEGER PRIMARY KEY, data TEXT); CREATE TABLE tokens (token TEXT, data INTEGER); Where tokens contains a list of each data row broken down into multiple tokens (split on semicolons). I want to create a trigger that on updates to data will remove all tokens for the item from the tokens table and then re-tokenize and insert the new tokens into the tokens table. Is there any way to get a trigger to insert a variable number of rows based on a single row being updated? Is there a way to write a custom function to do this? I've been thinking of writing a virtual table that would take the input in a WHERE clause and dump the tokens out, one per row, but I'm hoping that there is a simpler way to do this. Thanks.