elixir-sqlite / ecto_sqlite3

An Ecto SQLite3 adapter.
https://hexdocs.pm/ecto_sqlite3
MIT License
300 stars 45 forks source link

improvement: support `{:unsafe_fragment, ".."}` as a conflict target #129

Closed zachdaniel closed 1 year ago

zachdaniel commented 1 year ago

this is supported by other sql data layers, for example. This is necessary for AshSqlite3's upsert behavior. Postgres adapter implementation: https://github.com/elixir-ecto/ecto_sql/blob/v3.10.2/lib/ecto/adapters/postgres/connection.ex#L212C4-L213C26

warmwaffles commented 1 year ago

This looks good. I'll merge it once CI passes. It would be nice to have a test added for this. I don't know if there are unsafe fragment tests in the integration suite provided by ecto_sql and ecto.

zachdaniel commented 1 year ago

👍 will add one

zachdaniel commented 1 year ago

Alright, added a test :)

warmwaffles commented 1 year ago

Perfect!