Hi,

I have the following tables :
CREATE TABLE checksums
(i INTEGER,c VARCHAR(16) PRIMARY KEY) ;

CREATE TABLE data
(i INTEGER, data BLOB, isUnique INTEGER)

My application needs to insert 1000s of rows/second into the data table
hence I use transactions and prepare statements.

Now is it possible that while inserting (using transactions) in the
Checksums table when there is a CONFLICT as per the column "c" I update
table "data" column isUnique with the corresponding ID "i" from table
checksums.

Something like :
INSERT INTO checksums (1000, "abcdefghijklmnop") ON CONFLICT IGNORE BUT
UPDATE data SET isUnique = OLD.checksums.i

I know the above ON CONFLICT statement is wrong but I need a similar
functionality.

Is this possible with HOOKS / triggers or anything at all ?
This will be a great feature if its there.

Regards
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to