After the following setup SQL is executed:
CREATE TABLE upstb, FALLBACK (item integer, itemCount integer) PRIMARY INDEX (item); insert into upstb(1,1); insert into upstb(2,1); insert into upstb(3,1); insert into upstb(4,1);
the sample program output is:
EXECUTING "upsert" SQL: update upstb set itemcount=11 where item=11 else insert into upstb(11,11)... BEFORE UPSERT: 4 ROWS SELECTED UPSTB row : 2 | 1 UPSTB row : 3 | 1 UPSTB row : 4 | 1 UPSTB row : 1 | 1 AFTER UPSERT: 5 ROWS SELECTED UPSTB row : 2 | 1 UPSTB row : 3 | 1 UPSTB row : 4 | 1 UPSTB row : 11 | 11 UPSTB row : 1 | 1