OllieJones / sqlite-object-cache

A WordPress persistent object cache for the rest of us.
GNU General Public License v2.0
24 stars 4 forks source link

Automatically adapt to the SQLite3 version and use UPSERT if it's available #4

Closed OllieJones closed 1 year ago

OllieJones commented 1 year ago

Upsert functionality (ON CONFLICT) isn't available before SQLite 3.22, so v 0.1.0 does upserts by attempting an UPDATE, then doing an INSERT if the update didn't change any rows. Proper UPSERT is likely a bit faster, but it takes some version-dependent code.