aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-07-25 19:18:07 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-07-25 19:18:07 -0700
commit3bfc43df5810196c3aeafa5e0fc32308c55d76b2 (patch)
treeefb6feeba3711a119c8fa6e274bb434d4d5d6762 /rust/src
parent51c519a0800ce23a69adced4530b12184b4172ce (diff)
downloadfatcat-3bfc43df5810196c3aeafa5e0fc32308c55d76b2.tar.gz
fatcat-3bfc43df5810196c3aeafa5e0fc32308c55d76b2.zip
actually ON CONFLICT abstract creation (and test)
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/api_server.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index d172cb16..00d5cdde 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -807,9 +807,9 @@ impl Server {
if !new_abstracts.is_empty() {
// Sort of an "upsert"; only inserts new abstract rows if they don't already exist
insert_into(abstracts::table)
- .values(new_abstracts)
- //.on_conflict(abstracts::sha1)
- //.do_nothing()
+ .values(&new_abstracts)
+ .on_conflict(abstracts::sha1)
+ .do_nothing()
.execute(conn)?;
}
let release_abstract_rows: Vec<ReleaseRevAbstractNewRow> = abstract_list