Support deleting duplicates in insert-missing-data-and-return-all-ids
This is useful when you want to pass in data with some duplicates, and get back a list of ids, where the duplicate entries are represented by the same id.
This commit is contained in:
parent
1a55022524
commit
2b5594e5d4
1 changed files with 5 additions and 2 deletions
|
|
@ -77,7 +77,8 @@
|
|||
fields
|
||||
data
|
||||
#:key
|
||||
sets-of-data?)
|
||||
sets-of-data?
|
||||
delete-duplicates?)
|
||||
(define field-strings
|
||||
(map symbol->string fields))
|
||||
|
||||
|
|
@ -180,7 +181,9 @@
|
|||
existing-entries)))
|
||||
(if sets-of-data?
|
||||
(delete-duplicates (concatenate data))
|
||||
data)))
|
||||
(if delete-duplicates?
|
||||
(delete-duplicates data)
|
||||
data))))
|
||||
(new-entries
|
||||
(if (null? missing-entries)
|
||||
'()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue