SqlPreparationQueryModelVisitor generates a SqlStatement from a query model.
Inheritance: QueryModelVisitorBase
    public static SqlStatement TransformQueryModel (
        QueryModel queryModel,
        ISqlPreparationContext parentPreparationContext,
        ISqlPreparationStage stage,
        UniqueIdentifierGenerator generator,
        ResultOperatorHandlerRegistry resultOperatorHandlerRegistry)
    {
      ArgumentUtility.CheckNotNull ("queryModel", queryModel);
      ArgumentUtility.CheckNotNull ("stage", stage);
      ArgumentUtility.CheckNotNull ("generator", generator);
      ArgumentUtility.CheckNotNull ("resultOperatorHandlerRegistry", resultOperatorHandlerRegistry);

      var visitor = new SqlPreparationQueryModelVisitor (parentPreparationContext, stage, generator, resultOperatorHandlerRegistry);
      queryModel.Accept (visitor);

      return visitor.GetSqlStatement();
    }
        public static SqlStatement TransformQueryModel(
            QueryModel queryModel,
            ISqlPreparationContext parentPreparationContext,
            ISqlPreparationStage stage,
            UniqueIdentifierGenerator generator,
            ResultOperatorHandlerRegistry resultOperatorHandlerRegistry)
        {
            ArgumentUtility.CheckNotNull("queryModel", queryModel);
            ArgumentUtility.CheckNotNull("stage", stage);
            ArgumentUtility.CheckNotNull("generator", generator);
            ArgumentUtility.CheckNotNull("resultOperatorHandlerRegistry", resultOperatorHandlerRegistry);

            var visitor = new SqlPreparationQueryModelVisitor(parentPreparationContext, stage, generator, resultOperatorHandlerRegistry);

            queryModel.Accept(visitor);

            return(visitor.GetSqlStatement());
        }
示例#3
0
 public virtual SqlStatement PrepareSqlStatement(QueryModel queryModel, ISqlPreparationContext parentContext)
 {
     return(SqlPreparationQueryModelVisitor.TransformQueryModel(queryModel, parentContext, this, _uniqueIdentifierGenerator, _resultOperatorHandlerRegistry));
 }