elixir-sqlite/sqlite_ecto2

UPSERT with ON CONFLICT

venkatd opened this issue · 4 comments

It looks like as of 3.24, sqlite3 supports ON CONFLICT UPDATE that mimics the postgres syntax: https://www.sqlite.org/lang_UPSERT.html

I saw that https://github.com/mmzeeman/esqlite has updated to 3.24 at least on the master branch.

I'm a newbie to the Ecto internals so if someone is able to point me in the right direction, I can take a stab at implementing this.

UPSERT will be very useful to us so we can treat sqlite as a key-value store.

We follow releases of esqlite, so when it is released i will investigate integrating UPSERTs with Ecto.
For what it's worth if you want to take a look, you can add {:esqlite, github: "mmzeeman/esqlite", override: true, manager: :rebar3} to your deps. this is likely the function that will need to be updated.

and here is the postgrex implementation

@ConnorRigby thanks for the pointers.

Closed by #233