The by() Modulator: Single-by Steps
aggregate(), store(), groupCount() and valueMap() take one by().
- TinkerPop: a second
by()on these steps is an error. - Graphersal: the same; the second
by()fails withInvalidModulatorwhen the traversal executes, and thehelp()text shows how to project several values in one traversal. valueMap().by(...)applies its oneby()to every key; it never cycles through severalby()modulators.- Unaffected:
group()takes a keyby()and a valueby();project(),order()andpath()keep their ownby()rules.
g.V().aggregate("x").by("name").by("age").toList()
// Caused by: `aggregate()` cannot use its by() #2: aggregate() and store() take a single by()
g.V().aggregate("x").by(__.values("name", "age").fold()).cap("x") // one traversal instead