Exemple #1
0
        private void BuildWhereNode(EqlWhereNode whereNode, ParseTreeNode parseTreeNode)
        {
            //first child node is WHERE keyword
            var binaryExpressionNode = parseTreeNode.ChildNodes[1];

            whereNode.RootExpressionNode = BuildBinaryExpressionNode(binaryExpressionNode);
        }
        private void BuildWhereNode(EqlWhereNode whereNode, ParseTreeNode parseTreeNode)
        {
            //first child node is WHERE keyword
            var expressionNode = parseTreeNode.ChildNodes[1];

            if (expressionNode.Term.Name == "binary_expression")
            {
                whereNode.RootExpressionNode = BuildBinaryExpressionNode(expressionNode);
            }
            else if (expressionNode.Term.Name == "term")             //when brakets are used for OR in root expression
            {
                whereNode.RootExpressionNode = BuildBinaryExpressionNode(expressionNode.ChildNodes[0].ChildNodes[0]);
            }
            else
            {
                throw new EqlException("Unsupported node type during WHERE clause processing.");
            }
        }