Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upOur PG upsert API is clunky and we should fix it #1166
Comments
sgrif
added
breaking change
discussion desired
labels
Sep 15, 2017
sgrif
added this to the 1.0 milestone
Sep 15, 2017
sgrif
added
the
mentoring available
label
Sep 15, 2017
This comment has been minimized.
|
I'll give this one a try |
sgrif
assigned
alexcameron89
Sep 15, 2017
added a commit
that referenced
this issue
Sep 21, 2017
added a commit
that referenced
this issue
Sep 21, 2017
added a commit
that referenced
this issue
Sep 22, 2017
sgrif
referenced this issue
Sep 22, 2017
Merged
Deprecate `on_conflict`, `do_nothing`, and `do_update` #1189
added a commit
that referenced
this issue
Sep 22, 2017
sgrif
closed this
in
#1189
Sep 23, 2017
added a commit
that referenced
this issue
Sep 24, 2017
sgrif
referenced this issue
Sep 24, 2017
Merged
Allow `filter` to be called on `UpdateStatement` and `DeleteStatement` #1192
added a commit
that referenced
this issue
Sep 25, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedSep 15, 2017
I've really disliked using our upsert API in practice. You basically always need to pull
records.on_conflict(...)into a local variable since it's going to span multiple lines, and it's really hard to name that variable. https://github.com/rust-lang/crates.io/blob/9c8947c4d171706f490dfd8dfeb932a714d252be/src/download.rs#L43-L50 https://github.com/rust-lang/crates.io/blob/9c8947c4d171706f490dfd8dfeb932a714d252be/src/categories.rs#L125-L140I'd like to change our API to something more fluent, which more naturally allows for line breaks where they're likely to occur. I'd like to make the following changes: