MCPcopy Create free account
hub / github.com/microsoft/SandDance / sortRef

Function sortRef

docs/app/js/sanddance-app.js:149627–149634  ·  view source on GitHub ↗
(sort)

Source from the content-addressed store, hash-verified

149625 }))) : keyRef(fields, flat);
149626 },
149627 sortRef (sort) {
149628 if (!sort) return sort; // including id ensures stable sorting
149629 const a = aggrField(sort.op, sort.field), o = sort.order || Ascending;
149630 return o.signal ? ref(this.add(Compare({
149631 fields: a,
149632 orders: this.signalRef(o.signal)
149633 }))) : compareRef(a, o);
149634 },
149635 // ----
149636 event (source, type) {
149637 const key = source + ":" + type;

Callers

nothing calls this directly

Calls 5

aggrFieldFunction · 0.70
refFunction · 0.70
CompareFunction · 0.70
compareRefFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected