Beispiel #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);
			}
		}
Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
			public ResultAliasContext(SQLQueryReturnProcessor parent)
			{
				this.parent = parent;
			}
 public ResultAliasContext(SQLQueryReturnProcessor parent)
 {
     this.parent = parent;
 }
Beispiel #6
0
			public ParserContext(SQLQueryReturnProcessor.ResultAliasContext aliasContext)
			{
				this.aliasContext = aliasContext;
			}