Exemplo n.º 1
0
 public void SortTwoKeysCodegen(
     CodegenMethod method,
     CodegenClassScope classScope,
     CodegenNamedMethods namedMethods)
 {
     OrderByProcessorImpl.SortTwoKeysCodegen(this, method, classScope, namedMethods);
 }
        protected internal static void SortTwoKeysCodegen(
            OrderByProcessorOrderedLimitForge forge,
            CodegenMethod method,
            CodegenClassScope classScope,
            CodegenNamedMethods namedMethods)
        {
            var sortTwoKeys = method.MakeChild(typeof(EventBean[]), typeof(OrderByProcessorOrderedLimit), classScope)
                .AddParam(SORTTWOKEYS_PARAMS);
            OrderByProcessorImpl.SortTwoKeysCodegen(forge.OrderByProcessorForge, sortTwoKeys, classScope, namedMethods);

            method.Block.DeclareVar<EventBean[]>(
                    "sorted",
                    LocalMethod(
                        sortTwoKeys,
                        REF_ORDERFIRSTEVENT,
                        REF_ORDERFIRSTSORTKEY,
                        REF_ORDERSECONDEVENT,
                        REF_ORDERSECONDSORTKEY))
                .MethodReturn(ExprDotMethod(REF_ROWLIMITPROCESSOR, "DetermineLimitAndApply", Ref("sorted")));
        }