diff options
author | Christopher Baines <mail@cbaines.net> | 2019-11-03 16:03:51 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-11-03 16:04:51 +0000 |
commit | fea4dc9385f6f42e7b89f1fafe1a8189f62af9eb (patch) | |
tree | b2c38512e4a195f64d9ce33b99bd497ccefbee87 | |
parent | 5e1808b4c2e8494d394bc479f06cdbbb3d30798d (diff) | |
download | data-service-fea4dc9385f6f42e7b89f1fafe1a8189f62af9eb.tar data-service-fea4dc9385f6f42e7b89f1fafe1a8189f62af9eb.tar.gz |
Sort the derivation inputs by derivation file name
As this is the way they're sorted in the derivation.
-rw-r--r-- | guix-data-service/model/derivation.scm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm index 3b121a1..9502ee6 100644 --- a/guix-data-service/model/derivation.scm +++ b/guix-data-service/model/derivation.scm @@ -245,16 +245,18 @@ ORDER BY derivations.system DESC, (define (select-derivation-inputs-by-derivation-id conn id) (define query (string-append - "SELECT derivations.file_name, derivation_outputs.name, " - "derivation_output_details.path " - "FROM derivation_inputs " - "INNER JOIN derivation_outputs" - " ON derivation_outputs.id = derivation_inputs.derivation_output_id " - "INNER JOIN derivation_output_details" - " ON derivation_outputs.derivation_output_details_id = derivation_output_details.id " - "INNER JOIN derivations" - " ON derivation_outputs.derivation_id = derivations.id " - "WHERE derivation_inputs.derivation_id = $1")) + " +SELECT derivations.file_name, derivation_outputs.name, + derivation_output_details.path +FROM derivation_inputs +INNER JOIN derivation_outputs + ON derivation_outputs.id = derivation_inputs.derivation_output_id +INNER JOIN derivation_output_details + ON derivation_outputs.derivation_output_details_id = derivation_output_details.id +INNER JOIN derivations + ON derivation_outputs.derivation_id = derivations.id +WHERE derivation_inputs.derivation_id = $1 +ORDER BY derivations.file_name")) (exec-query conn query (list id))) |