Use numbers for ids in the derivation model
As this is easier to handle when doing queries with PostgreSQL, as you can use the type information to determine how to handle the values.
This commit is contained in:
parent
2cb389037b
commit
2485da7cfc
1 changed files with 5 additions and 2 deletions
|
|
@ -419,7 +419,9 @@ ORDER BY derivations.system DESC,
|
||||||
#t "debug: insert-missing-derivations: inserting ~A derivations\n"
|
#t "debug: insert-missing-derivations: inserting ~A derivations\n"
|
||||||
(length derivations))
|
(length derivations))
|
||||||
(let ((derivation-ids
|
(let ((derivation-ids
|
||||||
(map car (exec-query conn (insert-into-derivations)))))
|
(map (lambda (result)
|
||||||
|
(string->number (car result)))
|
||||||
|
(exec-query conn (insert-into-derivations)))))
|
||||||
|
|
||||||
(simple-format
|
(simple-format
|
||||||
#t "debug: insert-missing-derivations: updating hash table\n")
|
#t "debug: insert-missing-derivations: updating hash table\n")
|
||||||
|
|
@ -580,7 +582,8 @@ WHERE " criteria ";"))
|
||||||
conn
|
conn
|
||||||
(select-existing-derivations missing-file-names)
|
(select-existing-derivations missing-file-names)
|
||||||
second ;; file_name
|
second ;; file_name
|
||||||
first))) ;; id
|
(lambda (result)
|
||||||
|
(string->number (first result)))))) ;; id
|
||||||
(simple-format
|
(simple-format
|
||||||
#t "debug: derivation-file-names->vhash: adding ~A entries to the cache\n"
|
#t "debug: derivation-file-names->vhash: adding ~A entries to the cache\n"
|
||||||
(vlist-length result-for-missing-file-names))
|
(vlist-length result-for-missing-file-names))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue