You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First piece of diesel-rs#196. SQLite has extremely simple semantics here. `INSERT
OR REPLACE` will literally take what the new row would have been had the
insert succeeded, and will replace the existing row with it. For this to
be most useful, we'll probably want to make it easier to use non-literal
expressions in insert at some point in the future. We'll need to see
what other usage looks like.
This also lays the groundwork for supporting the other modifiers on
SQLite. I had originally planned on doing an API that looks more like
what PG will look like. However, since the semantics are so different,
we'll probably want to keep the APIs from stepping on each others toes.
Another alternative I had leaned towards was `insert.or(replace)`.
However, as I started thinking about the compile fail tests that'd be
required there, and saw the implementation, I shied away from it. Since
there's a fixed set of 4 modifiers that we will support, I think one
function each is fine.
0 commit comments