2

Does anyone know if its possible to get a INSERT OR IGNORE function with SQLModel? And if not, does anyone know if there is a workaround to get the same results?

I haven't tried anything to get the results I'm look for as I'm fairly new to programming. I just been reading of documentation.

If you have used SQLite before you know that INSERT OR IGNORE is a function that looks for the primary_key in your database and if it doesn't exist, it will insert the new data into the database, but if the primary_key does exist, it will completely ignore the data and prevent errors on your code.

martineau
  • 119,623
  • 25
  • 170
  • 301
  • a very common DB idiom is an `UPSERT` which [doesn't seem supported](https://github.com/tiangolo/sqlmodel/issues/59) yet, so presumably this isn't supported either – Sam Mason Mar 31 '22 at 10:17

0 Answers0