stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.67k stars 1.56k forks source link

How to avoid duplicate inserts? #946

Closed ws4715535 closed 3 years ago

ws4715535 commented 5 years ago

like the sqlite api: insert or ignore into ...

jlawton commented 5 years ago

Wouldn't this be an insert with unique constraints set on whatever columns in the given table?

ws4715535 commented 5 years ago

it can't work when i set two unique constraints at same time

nathanfallet commented 3 years ago

Try with upsert.