예제 #1
0
		public SQLCustomQuery(INativeSQLQueryReturn[] queryReturns, string sqlQuery, ICollection<string> additionalQuerySpaces,
		                      ISessionFactoryImplementor factory)
		{
			log.Debug("starting processing of sql query [" + sqlQuery + "]");
			SQLQueryReturnProcessor processor = new SQLQueryReturnProcessor(queryReturns, factory);
			SQLQueryReturnProcessor.ResultAliasContext aliasContext = processor.Process();

			SQLQueryParser parser = new SQLQueryParser(sqlQuery, new ParserContext(aliasContext));
			sql = parser.Process();
			ArrayHelper.AddAll(namedParameterBindPoints, parser.NamedParameters);
			ArrayHelper.AddAll(customQueryReturns, processor.GenerateCustomReturns(parser.QueryHasAliases));

			if (additionalQuerySpaces != null)
			{
				querySpaces.AddAll(additionalQuerySpaces);
			}
		}
예제 #2
0
        public SQLCustomQuery(INativeSQLQueryReturn[] queryReturns, string sqlQuery, ICollection <string> additionalQuerySpaces,
                              ISessionFactoryImplementor factory)
        {
            log.Debug("starting processing of sql query [{0}]", sqlQuery);
            SQLQueryReturnProcessor processor = new SQLQueryReturnProcessor(queryReturns, factory);

            SQLQueryReturnProcessor.ResultAliasContext aliasContext = processor.Process();

            SQLQueryParser parser = new SQLQueryParser(factory, sqlQuery, new ParserContext(aliasContext));

            sql = parser.Process();
            ArrayHelper.AddAll(customQueryReturns, processor.GenerateCustomReturns(parser.QueryHasAliases));
            parametersSpecifications = parser.CollectedParametersSpecifications.ToList();

            if (additionalQuerySpaces != null)
            {
                querySpaces.UnionWith(additionalQuerySpaces);
            }
        }
예제 #3
0
        public SQLCustomQuery(INativeSQLQueryReturn[] queryReturns, string sqlQuery, ICollection <string> additionalQuerySpaces,
                              ISessionFactoryImplementor factory)
        {
            log.Debug("starting processing of sql query [" + sqlQuery + "]");
            SQLQueryReturnProcessor processor = new SQLQueryReturnProcessor(queryReturns, factory);

            SQLQueryReturnProcessor.ResultAliasContext aliasContext = processor.Process();

            SQLQueryParser parser = new SQLQueryParser(sqlQuery, new ParserContext(aliasContext));

            sql = parser.Process();
            ArrayHelper.AddAll(namedParameterBindPoints, parser.NamedParameters);
            ArrayHelper.AddAll(customQueryReturns, processor.GenerateCustomReturns(parser.QueryHasAliases));

            if (additionalQuerySpaces != null)
            {
                querySpaces.AddAll(additionalQuerySpaces);
            }
        }