Generate sorter Functions for ordering documents and leaves.

Static Functions

private
, | Function getDocSort ( ) {

Creates a complex sort function closing on the provided specification document. Documents are compared according to the specification.

Arguments

Returns

| Function

A Function suitable for use with standard sorting.

private
, | Function getLeafSort ( ) {

Creates a simple sort function closing on the desired sort polarity. MongoDB documents are compared as leaf data, with data type being the highest priority.

Arguments

Returns