[Racket] Ferti hydroponic nutrient solver, redux.
Tighten up function.
models/nutrient.rkt
@@ -65,10 +65,10 @@
65
65
(nutrient id canonical-name french-name formula))
66
66
67
67
(define (get-nutrients)
68
Removed:
(define rows
69
Removed:
(query-rows (current-conn)
70
Removed:
(select id canonical_name french_name formula #:from nutrients #:order-by id #:asc)))
71
Removed:
(map row->nutrient rows))
68
Added:
(map row->nutrient
69
Added:
(query-rows
70
Added:
(current-conn)
71
Added:
(select id canonical_name french_name formula #:from nutrients #:order-by id #:asc))))
72
72
73
73
(define (get-nutrient #:id [id #f] #:name [canonical-name #f] #:formula [formula #f])
74
74
(define where