Open verdverm opened 2 years ago
For list processing on ops, use @list(and,or,index)
defaults to and
op: {
LD: [schema] @list() // process all RHS list elements with this one
LA: [s1,s2] @list(and) // op if all LHS elems unify with an elem of RHS
LO: [s1,s2] @list(or) // op if any LHS elem unifies with an elem of RHS
LP: [s1,s2,s3] @list(index) // pairwise unification, lists must be same length
}
Diff / Patch needs different processing, need a way to calc an index field, maybe @list(<index_field_name>)
How would this even be specified? We probably need an additional input like diff-cfg
. Maybe some way to specify associative list once that proposal is implemented, but still need a config arg probably? Maybe there is decent default behavior? (prob just elem wise, stop once at end of one list) Maybe there is a short list of discriminator fields to match up (uuid
, id
, name
), but they would need to be unique in both lists.
lists are hard to diff and such, but we should try some sort of implementation in the helpers
--list-config
flag most likelynote, this is different from processing top-level lists