public static IList <object> GetJsonExpression(Expression expression, OrderingDirection direction)
        {
            var visitor = new LiteCoreOrderingExpressionVisitor();

            visitor.Visit(expression);
            return(visitor.GetJsonExpression(direction));
        }
        public override void VisitOrdering(Ordering ordering, QueryModel queryModel, OrderByClause orderByClause, int index)
        {
            var masterList = new List <object>();

            foreach (var o in orderByClause.Orderings)
            {
                masterList.AddRange(LiteCoreOrderingExpressionVisitor.GetJsonExpression(o.Expression, o.OrderingDirection));
            }

            _query["ORDER_BY"] = masterList;
            base.VisitOrdering(ordering, queryModel, orderByClause, index);
        }