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); } }
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 ParserContext(SQLQueryReturnProcessor.ResultAliasContext aliasContext) { this.aliasContext = aliasContext; }