예제 #1
0
        public override EventAdvancedIndexProvisionDesc ValidateEventIndex(
            string indexName,
            string indexTypeName,
            ExprNode[] columns,
            ExprNode[] parameters)
        {
            AdvancedIndexValidationHelper.ValidateColumnCount(4, indexTypeName, columns.Length);
            AdvancedIndexValidationHelper.ValidateColumnReturnTypeNumber(indexTypeName, 0, columns[0], AdvancedIndexQuadTreeConstants.COL_X);
            AdvancedIndexValidationHelper.ValidateColumnReturnTypeNumber(indexTypeName, 1, columns[1], AdvancedIndexQuadTreeConstants.COL_Y);
            AdvancedIndexValidationHelper.ValidateColumnReturnTypeNumber(indexTypeName, 2, columns[2], AdvancedIndexQuadTreeConstants.COL_WIDTH);
            AdvancedIndexValidationHelper.ValidateColumnReturnTypeNumber(indexTypeName, 3, columns[3], AdvancedIndexQuadTreeConstants.COL_HEIGHT);

            ValidateParameters(indexTypeName, parameters);

            var indexDesc             = new AdvancedIndexDesc(indexTypeName, columns);
            var xEval                 = indexDesc.IndexedExpressions[0].ExprEvaluator;
            var yEval                 = indexDesc.IndexedExpressions[1].ExprEvaluator;
            var widthEval             = indexDesc.IndexedExpressions[2].ExprEvaluator;
            var heightEval            = indexDesc.IndexedExpressions[3].ExprEvaluator;
            var indexStatementConfigs = new AdvancedIndexConfigStatementMXCIFQuadtree(xEval, yEval, widthEval, heightEval);

            return(new EventAdvancedIndexProvisionDesc(
                       indexDesc, ExprNodeUtility.GetEvaluators(parameters),
                       EventAdvancedIndexFactoryQuadTreeMXCIF.INSTANCE,
                       indexStatementConfigs));
        }
        public override EventAdvancedIndexProvisionDesc ValidateEventIndex(
            string indexName, string indexTypeName, ExprNode[] columns, ExprNode[] parameters)
        {
            AdvancedIndexValidationHelper.ValidateColumnCount(2, indexTypeName, columns.Length);
            AdvancedIndexValidationHelper.ValidateColumnReturnTypeNumber(indexTypeName, 0, columns[0], AdvancedIndexQuadTreeConstants.COL_X);
            AdvancedIndexValidationHelper.ValidateColumnReturnTypeNumber(indexTypeName, 1, columns[1], AdvancedIndexQuadTreeConstants.COL_Y);

            ValidateParameters(indexTypeName, parameters);

            var           indexDesc             = new AdvancedIndexDesc(indexTypeName, columns);
            ExprEvaluator xEval                 = indexDesc.IndexedExpressions[0].ExprEvaluator;
            ExprEvaluator yEval                 = indexDesc.IndexedExpressions[1].ExprEvaluator;
            var           indexStatementConfigs = new AdvancedIndexConfigStatementPointRegionQuadtree(xEval, yEval);

            return(new EventAdvancedIndexProvisionDesc(
                       indexDesc, ExprNodeUtility.GetEvaluators(parameters),
                       EventAdvancedIndexFactoryQuadTreePointRegion.INSTANCE,
                       indexStatementConfigs));
        }