webkit-sqlite adapter should use INSERT OR REPLACE
scyclops opened this issue · 1 comments
scyclops commented
Using "INSERT OR REPLACE" will achieve the same effect as the current conditional usage of INSERT or UPDATE and requires one less query because it doesn't have to check whether the key exists first.
For docs on how insert or replace works, see:
https://sqlite.org/lang_insert.html
Also, the exists method might be more efficient if it used count(*) instead of actually selecting all the rows.
stigtsp commented
It already does in master, but i suppose not in the dist package