Closed rnewman closed 6 years ago
We can't easily detect duplicates within a tx boundary: we can use INSERT
and have an opaque error about uniqueness constraints being violated, which we wrap to Could not insert non-fts one statements into temporary search table!
; use INSERT OR IGNORE
and silently take the first value; or INSERT OR REPLACE
and silently take the last (based on some permutation of the input order, I assume).
I think I'd prefer the opaque error, which we can improve in the future. I'll file that now.
ef9f2d9 with a map notation test.
This requires maintaining a unique index so that we can
INSERT OR REPLACE
. The last value will win. We could also doINSERT OR IGNORE
, check the number of changed rows, and throw.This only works if the lookup ref succeeds. If it doesn't, then we're into #532.
Thoughts, @ncalexan?