SqlContextSelectionAdjuster applies a SqlExpressionContext to a SqlStatement by modifying the SqlStatement's SqlStatement.SelectProjection and recalculating all dependent data accordingly.
Example #1
0
        public virtual SqlStatement ApplySelectionContext(SqlStatement sqlStatement, SqlExpressionContext expressionContext, IMappingResolutionContext mappingResolutionContext)
        {
            ArgumentUtility.CheckNotNull("sqlStatement", sqlStatement);
            ArgumentUtility.CheckNotNull("mappingResolutionContext", mappingResolutionContext);

            return(SqlContextSelectionAdjuster.ApplyContext(sqlStatement, expressionContext, this, mappingResolutionContext));
        }
    public static SqlStatement ApplyContext (SqlStatement sqlStatement, SqlExpressionContext expressionContext, IMappingResolutionStage stage, IMappingResolutionContext mappingresolutionContext)
    {
      ArgumentUtility.CheckNotNull ("sqlStatement", sqlStatement);
      ArgumentUtility.CheckNotNull ("stage", stage);
      ArgumentUtility.CheckNotNull ("mappingresolutionContext", mappingresolutionContext);

      var visitor = new SqlContextSelectionAdjuster (stage, mappingresolutionContext);
      return visitor.VisitSqlStatement (sqlStatement, expressionContext);
    }
Example #3
0
        public static SqlStatement ApplyContext(SqlStatement sqlStatement, SqlExpressionContext expressionContext, IMappingResolutionStage stage, IMappingResolutionContext mappingresolutionContext)
        {
            ArgumentUtility.CheckNotNull("sqlStatement", sqlStatement);
            ArgumentUtility.CheckNotNull("stage", stage);
            ArgumentUtility.CheckNotNull("mappingresolutionContext", mappingresolutionContext);

            var visitor = new SqlContextSelectionAdjuster(stage, mappingresolutionContext);

            return(visitor.VisitSqlStatement(sqlStatement, expressionContext));
        }