Exemplo n.º 1
0
        public CmsqlExpressionVisitorContext Parse(
            ContentType contentType,
            ICmsqlQueryExpression expression)
        {
            CmsqlExpressionVisitorContext context = new CmsqlExpressionVisitorContext(contentType);

            if (contentType == null)
            {
                return(context);
            }

            if (expression == null)
            {
                context.PushNewPropertyCriteriaCollection();
                return(context);
            }

            CmsqlExpressionVisitor visitor =
                new CmsqlExpressionVisitor(
                    new QueryConditionToPropertyCriteriaMapper(
                        new PropertyDataTypeResolver(contentType)), context);

            expression.Accept(visitor);

            return(context);
        }
 internal CmsqlExpressionVisitor(
     QueryConditionToPropertyCriteriaMapper conditionToCriteriaMapper,
     CmsqlExpressionVisitorContext context)
 {
     _conditionToCriteriaMapper = conditionToCriteriaMapper;
     Context = context;
 }
 internal CmsqlBinaryOrExpressionVisitor(
     QueryConditionToPropertyCriteriaMapper conditionToCriteriaMapper,
     CmsqlExpressionVisitorContext context)
     : base(conditionToCriteriaMapper, context)
 {
 }