Open cldwalker opened 3 years ago
We've had a number of repetitive queries that just iterate over one attribute e.g.
{:site-trial-patient [[1 {:refs {:site-patient-id :sp0 :site-trial-id :st0 :patient-source-id :ps1}}] [1 {:refs {:site-patient-id :sp1 :site-trial-id :st0 :patient-source-id :ps1}}] [1 {:refs {:site-patient-id :sp2 :site-trial-id :st0 :patient-source-id :ps1}}]]}
We can make these more readable with for e.g.
for
(vec (for [id [:sp0 :sp1 :sp2]] [1 {:refs {:site-patient-id id :site-trial-id :st0 :patient-source-id :ps1}}]))
It would be helpful for this to be supported in specmonstah as it would make this easy and would allow iteration to be done in contexts where we only want to interact with specmonstah queries as edn. One idea:
[3 {:refs {:site-patient-id [:for [:sp0 :sp1 :sp2]] :site-trial-id :st0 :patient-source-id :ps1}}]
We've had a number of repetitive queries that just iterate over one attribute e.g.
We can make these more readable with
for
e.g.It would be helpful for this to be supported in specmonstah as it would make this easy and would allow iteration to be done in contexts where we only want to interact with specmonstah queries as edn. One idea: